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 Index » General IBM MQ Support » Header and message compression on IBM.XMS with C# .NET

Post new topic  Reply to topic
 Header and message compression on IBM.XMS with C# .NET « View previous topic :: View next topic » 
Author Message
dudetom
PostPosted: Tue Jul 03, 2018 5:45 am    Post subject: Header and message compression on IBM.XMS with C# .NET Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Tue Jul 03, 2018 6:48 pm    Post subject: Reply with quote

Padawan

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

It is my understanding that the XMS interface is supposed to very closely match the JMS interface.

Here is a page which shows how to use compression in the JMS Interface:-

Channel compression in WebSphere MQ classes for JMS

I too could find nothing about it with specific XMS examples.

Now do beware that you cannot use channel compression in the Managed environment (see Managed and unmanaged operations in .NET).

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: Wed Jul 04, 2018 10:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Wed Jul 04, 2018 11:15 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
dudetom
PostPosted: Fri Jul 06, 2018 12:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat Jul 07, 2018 5:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20695
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
View user's profile Send private message Send e-mail
dudetom
PostPosted: Sun Jul 08, 2018 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun Jul 08, 2018 10:48 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20695
Location: LI,NY

dudetom wrote:
IConnectionFactory has no setHdrCompList. Check https://dotnetfiddle.net/kshLHc. So there is no other way than using amqmdnet dll?

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
View user's profile Send private message Send e-mail
dudetom
PostPosted: Sun Jul 08, 2018 10:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Mon Jul 09, 2018 1:47 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
dudetom
PostPosted: Mon Jul 09, 2018 6:36 am    Post subject: Reply with quote

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
View user's profile Send private message
dudetom
PostPosted: Tue Jul 10, 2018 3:59 am    Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Wed Jul 11, 2018 3:50 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
dudetom
PostPosted: Thu Jul 12, 2018 1:05 am    Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Thu Jul 12, 2018 3:23 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Header and message compression on IBM.XMS with C# .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.