ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexGeneral IBM MQ SupportHow is XMSC_WMQ_HEADER_COMP set in XMS.NET

Post new topicReply to topic
How is XMSC_WMQ_HEADER_COMP set in XMS.NET View previous topic :: View next topic
Author Message
dudetom
PostPosted: Thu Jul 19, 2018 3:37 am Post subject: How is XMSC_WMQ_HEADER_COMP set in XMS.NET Reply with quote

Apprentice

Joined: 29 Sep 2017
Posts: 38

There is no documentation about this property. How can I set the following property in XMS.NET (not JMS):

XMSC_WMQ_HEADER_COMP

There are possible 'values' but these are no constants, they are static int variables. Possible values which are always '0' when set, so I think this is not the way to go:

-------------------
public static readonly int WMQ_COMPHDR_SYSTEM;
public static readonly int WMQ_COMPHDR_DEFAULT;
public static readonly int WMQ_COMPHDR_NONE;
-------------------


Code Example:

var factory1 = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
var cf1 = factory1.CreateConnectionFactory();

cf1.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);
// other properties not shown for simplicity...
cf1.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "*");
cf1.SetStringProperty(XMSC.WMQ_HEADER_COMP, /* How to set WMQ_HEADER_COMP ? */);

var connection1 = cf1.CreateConnection();
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Jul 19, 2018 12:59 pm Post subject: Re: How is XMSC_WMQ_HEADER_COMP set in XMS.NET Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3062
Location: London, ON Canada

WMQ_COMPHDR_SYSTEM is an integer value, so you need to do:

Code:
cf1.SetIntProperty(XMSC.WMQ_HEADER_COMP, XMSC.WMQ_COMPHDR_SYSTEM);


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
dudetom
PostPosted: Thu Jul 19, 2018 9:53 pm Post subject: Reply with quote

Apprentice

Joined: 29 Sep 2017
Posts: 38

@RogerLacroix

Could you please test this out? The way you show does not work. Please read my whole post.

WMQ_COMPHDR_SYSTEM is a variable compared to all other properties in XMSC which are constants, and setting this just passes the value '0' which is not setting compression on the channel.

And besides that message compression (XMSC_WMQ_MSG_COMP) accepts more than one value, so how to set a list of values? I thought about doing:

cf.SetObjectProperty(XMSC.WMQ_MSG_COMP, new ArrayList { /*some value*/ });

Wil this work?
Back to top
View user's profile Send private message
hughson
PostPosted: Fri Jul 20, 2018 7:24 am Post subject: Reply with quote

Shaman

Joined: 09 May 2013
Posts: 780
Location: Bay of Plenty, New Zealand

Check out the answer to your other post for the same question.

In short, you cannot set these in XMS .NET, you must use a CCDT if you want channel compression.

Cheers,
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
dudetom
PostPosted: Sat Jul 21, 2018 2:55 am Post subject: Reply with quote

Apprentice

Joined: 29 Sep 2017
Posts: 38

You are right but please check my post here:

https://gist.github.com/ozkanb/61e4ef34d41e9740a4b8ab3eeb4ed560

I try to configure message compression on a IBM MQ connection using CCDT files. I configured compression in the CCDT file, but the problem is that the property XMSC.WMQ_CCDTURL doesn't work. Environment variables MQCHLLIB and MQCHLTAB aren't an option because I need to make separate connections using separate CCDT files (load-balancing reasons).
Back to top
View user's profile Send private message
hughson
PostPosted: Sat Jul 21, 2018 7:46 am Post subject: Reply with quote

Shaman

Joined: 09 May 2013
Posts: 780
Location: Bay of Plenty, New Zealand

dudetom wrote:
You are right but please check my post here:

https://gist.github.com/ozkanb/61e4ef34d41e9740a4b8ab3eeb4ed560

I try to configure message compression on a IBM MQ connection using CCDT files. I configured compression in the CCDT file, but the problem is that the property XMSC.WMQ_CCDTURL doesn't work. Environment variables MQCHLLIB and MQCHLTAB aren't an option because I need to make separate connections using separate CCDT files (load-balancing reasons).
As already noted in that thread, there is no need to use separate CCDT files. Just put all the definitions into one CCDT file and use the QMNAME attribute to separate what you were previously putting into separate CCDT files.
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
dudetom
PostPosted: Sat Jul 21, 2018 12:41 pm Post subject: Reply with quote

Apprentice

Joined: 29 Sep 2017
Posts: 38

The channel names are the same. I read somewhere that channel names must be unique in one CCDT...
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat Jul 21, 2018 1:11 pm Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 8112
Location: US: west coast, almost. Otherwise, enroute.

dudetom wrote:
You are right but please check my post here:

https://gist.github.com/ozkanb/61e4ef34d41e9740a4b8ab3eeb4ed560



As a security best-practice, I never click on an embedded URL. If you believe you have useful information that will help us help you, embed it here as Code or Quote.
_________________
I would tell you a UDP joke, but you might not get it.
Back to top
View user's profile Send private message
hughson
PostPosted: Sat Jul 21, 2018 9:12 pm Post subject: Reply with quote

Shaman

Joined: 09 May 2013
Posts: 780
Location: Bay of Plenty, New Zealand

dudetom wrote:
The channel names are the same. I read somewhere that channel names must be unique in one CCDT...
You are right, the channel names must be different. That would be a good practice anyway.
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportHow is XMSC_WMQ_HEADER_COMP set in XMS.NET
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.