Author |
Message
|
dudetom |
Posted: Tue Jul 03, 2018 5:45 am Post subject: Header and message compression on IBM.XMS with C# .NET |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
I can't find any way to configure Channel Compression on IBM.XMS.
Here you can see the ConnectionFactory being used:
https://dotnetfiddle.net/kshLHc
I couldn’t find a way to set compression by using SetHdrCompList() and SetMsgCompList(). The factory used by IBM.XMS is XMSFactoryFactory. And as I can see, only configurable property is IConnectionMetaData.
unfortunately I can’t find any information about channel compression on IBM.XMS.
Thanks for any help !
Last edited by dudetom on Sun Jul 08, 2018 10:51 pm; edited 1 time in total |
|
Back to top |
|
 |
hughson |
Posted: Tue Jul 03, 2018 6:48 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
|
Back to top |
|
 |
dudetom |
Posted: Wed Jul 04, 2018 10:45 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
There is a property WMQ_HEADER_COMP that I can set, but I can't find any information about it on the internet.
Only information I can find is:
static final java.lang.String WMQ_HEADER_COMP
ConnectionFactory property name. The list of header compression techniques.
The following are the properties that can be set but normally I should be able to set a list
static final int WMQ_COMPHDR_NONE
static final int WMQ_COMPHDR_SYSTEM
static final int WMQ_COMPHDR_DEFAULT |
|
Back to top |
|
 |
hughson |
Posted: Wed Jul 04, 2018 11:15 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
The link I mentioned in my previous post showed how to set a list as follows, using the method that you mentioned in your original question.
Code: |
Collection headerComp = new Vector();
headerComp.add(new Integer(WMQConstants.WMQ_COMPHDR_SYSTEM));
.
.
.
((MQConnectionFactory) cf).setHdrCompList(headerComp);
.
.
.
connection = cf.createConnection(); |
Is the equivalent not available for XMS? Is that the problem you are seeing? _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
dudetom |
Posted: Fri Jul 06, 2018 12:08 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
Yes, MQConnectionFactory is a Java class I think. I couldn't find the .NET equivalent... |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jul 07, 2018 5:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
dudetom wrote: |
Yes, MQConnectionFactory is a Java class I think. I couldn't find the .NET equivalent... |
I believe it's called IMQConnectionFactory in .NET or just IConnectionFactory...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dudetom |
Posted: Sun Jul 08, 2018 7:47 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
IConnectionFactory has no setHdrCompList. Check https://dotnetfiddle.net/kshLHc . So there is no other way then using amqmdnet dll?
Last edited by dudetom on Sun Jul 08, 2018 10:52 pm; edited 2 times in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 08, 2018 10:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
AFAIC you can set properties on the IConnectionFactory... So you need to set the compression on the properties... On the other hand you can always use a CCDT and set the compression on the client channel attributes.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
dudetom |
Posted: Sun Jul 08, 2018 10:17 pm Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
@fjb_saper Indeed, But for XMSC.WMQ_MSG_COMP and for XMSC.WMQ_HEADER_COMP it seems like it has to be configured in a special way because the configurable values are no constants and I can't configure a list of compression modes as in Java (setHdrCompList)...
Following property can be set:
XMSC.WMQ_MSG_COMP
Following values can be set on the above property, but how? These are not constant values (public static readonly int), contrary to all other configurable properties, so setting these with cf.SetIntProperty only sets the value to '0' (zero) which is incorrect I think.
XMSC.WMQ_COMPMSG_ZLIBHIGH
XMSC.WMQ_COMPMSG_RLE
XMSC.WMQ_COMPMSG_NONE
I actually need to set a list of compression modes (this is a requirement of our partner) ...
So my problem is, I can't find anywhere on the internet or in the IBM documentation a way to configure multiple compression modes on XMSC.WMQ_MSG_COMP.
Properties are also available for header compression in the same manner as for message compression (XMSC.WMQ_HEADER_COMP).
Thanks for any information |
|
Back to top |
|
 |
hughson |
Posted: Mon Jul 09, 2018 1:47 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
I have asked an IBMer in the XMS team to come and take a look at this question. Hopefully we will have an answer for you soon.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
dudetom |
Posted: Mon Jul 09, 2018 6:36 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
Thanks hughson, I hope that it's possible with XMS and hopefully I can receive an answer shortly |
|
Back to top |
|
 |
dudetom |
Posted: Tue Jul 10, 2018 3:59 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
I've seen that I can also use MQEnvironment.HdrCompList and MQEnvironment.MsgCompList but these are located in the assembly amqmdnet.dll in the namespace 'IBM.WMQ'. Would it work using MQEnvironment and IBM.XMS together? Or how can I verify if the compression is applied?
Until now I always used IBM.XMS.
The connection is of type XMSC.CT_WMQ (Websphere MQ) so it must be compatible I think? |
|
Back to top |
|
 |
hughson |
Posted: Wed Jul 11, 2018 3:50 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
The IBMer I contacted pointed out that he has answered the exact same question here.
Hopefully you have also seen his answer by now.
In short, compression is supported in XMS .NET when in un-managed mode, if you configure it using the CCDT.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
dudetom |
Posted: Thu Jul 12, 2018 1:05 am Post subject: |
|
|
Apprentice
Joined: 29 Sep 2017 Posts: 45
|
I assume we can't create these CCDT files as client? Should the Queue Manager creator/provider (our partner) create those files and provide it to us? I tried with QM Explorer, But I get QM name unknown. I don't know the exact Queue Manager name. We put asterisk '*' when connection using code. |
|
Back to top |
|
 |
hughson |
Posted: Thu Jul 12, 2018 3:23 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
dudetom wrote: |
I assume we can't create these CCDT files as client? |
Actually you can create them on the client if you want to. You can use runmqsc -n from V8 onwards, or for any release you can use a tool from MQGem called MQSCX. We have training modules on doing this if you need them (see my sig).
dudetom wrote: |
Should the Queue Manager creator/provider (our partner) create those files and provide it to us? |
The owner of the queue manager could provide them to you, or they might just tell you the channel name and conname in which case you could use that information to build your own CCDT.
dudetom wrote: |
I tried with QM Explorer, But I get QM name unknown. I don't know the exact Queue Manager name. We put asterisk '*' when connection using code. |
Try with a CCDT and one of the samples like amqsputc to test out rather MQ Explorer perhaps. Just to make sure you have the connectivity correct. You don't need to the know the queue manager name to make a connection if you put in '*' in the queue manager name, but MQ Explorer might need more information since it is an admin tool rather than just an application.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|