Author |
Message
|
dudetom |
Posted: Thu Jul 19, 2018 3:37 am Post subject: How is XMSC_WMQ_HEADER_COMP set in XMS.NET |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
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 |
|
 |
RogerLacroix |
Posted: Thu Jul 19, 2018 12:59 pm Post subject: Re: How is XMSC_WMQ_HEADER_COMP set in XMS.NET |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 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 |
|
 |
dudetom |
Posted: Thu Jul 19, 2018 9:53 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
@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 |
|
 |
hughson |
Posted: Fri Jul 20, 2018 7:24 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
|
Back to top |
|
 |
dudetom |
Posted: Sat Jul 21, 2018 2:55 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
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 |
|
 |
hughson |
Posted: Sat Jul 21, 2018 7:46 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 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 |
|
 |
dudetom |
Posted: Sat Jul 21, 2018 12:41 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
The channel names are the same. I read somewhere that channel names must be unique in one CCDT... |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Jul 21, 2018 1:11 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
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 like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
hughson |
Posted: Sat Jul 21, 2018 9:12 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 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 |
|
 |
|