Saturday, February 07, 2009

IBM MQ Series, XMS, and .NET

We have to be able to read in some information that another system is putting out over IBM MQ. There is a messaging implementation from IBM called XMS that seems like it's JMS over MQ. This is great for us because this means that we can (hopefully) clone our existing Tibco EMS adapters, and with a few little changes, be able to read off of MQ.

I am not sure if the original publisher of the data also has to use XMS ... maybe someone here can tell me. I know for a fact that the publishing system does not use XMS. If the publisher does have to use XMS in order for us to consume through XMS, then we will need to come up with an input adapter that uses the native MQ API.

The information about the IBM Messaging Client for .NET is here.


Update: A great comment by Richard Brown of IBM WebSphere pre-sales tells me that there is nothing to worry about if we are just a consumer ... which we are.


©2009 Marc Adler - All Rights Reserved.
All opinions here are personal, and have no relation to my employer.

5 comments:

Richard Brown said...

Hi Marc,

There is a good overview of XMS here: http://www.ibm.com/developerworks/websphere/library/techarticles/0509_phillips/0509_phillips.html

The short answer to your question is that there is no requirement for publishing applications to use XMS just because a subscriber happens to be using it. Indeed, that's the whole point: providing on-ramps for heterogeneous classes of clients.

The link you provided (and the developerWorks article above) both say that XMS clients can talk to other XMS applications, to WebSphere MQ JMS applications and to native MQ apps.

However, if the other application(s) are regular MQ apps then it can be helpful to think a little about how things work in order to avoid any problems down the line.

If the publishing application is a regular MQ app then things tend work just fine. The XMS API picks up the message, looks at the header and there's usually enough info to allow it to figure out whether to treat it as a BytesMessage or TextMessage or whatever. From your post, it sounds like this is the direction you would be using it in - so you should be fine. (Do some tests to be sure though...)

However, if you plan to use it in the other direction (XMS publisher, MQ receiver/subscriber) then be sure to read the docs and be a good citizen.

In particular, if you specify all kinds of exciting JMS/XMS header properties, then the JMS/XMS implementation has to record them somewhere in the underlying WebSphere MQ message that will end up on a queue somewhere. If the receiver is also a JMS or XMS client then great... they get all that context. But what if the application is a regular MQ app? It doesn't care about all these JMS/XMS header properties... so how can we be sure not to freak that application out?

The answer is that the MQ XMS and JMS implementations do a really good job with this sort of compatibility problem and map most JMS/XMS properties to standard MQ ones... but there's no accounting for badly-written consuming apps. So be sure to test properly if you start sending messages to existing MQ apps from new JMS/XMS clients.

As I say, it usually works out just fine but do be sure to read the docs.

Richard G Brown

(WebSphere pre-sales for Financial Markets clients in the UK... usual disclaimers apply... this isn't a formal IBM response, etc, etc, etc)

marc said...

Thanks Richard .... great to get this info directly from the source at IBM.

We will just be a consumer for the immediate future. We are just hanging off an existing MQ bus to listen for some information that is interesting to our CEP system.

Richard Brown said...

Thanks Marc.

Good luck with the project.

Richard.

Nigel said...

Marc

XMS is a JMS-like interface, implemented as native C/C++/C#. There is also a real (java) JMS client for MQ - see MQ JMS Overview.

The advantage of JMS is that you should be able to reuse your existing JMS interfaces to Tibco EMS, either by cut and paste (aka cloning) or by making them property or JNDI-driven. AFAIK there is no support for XMS from other MOM vendors - it can only be used for MQ.


Regards Nigel

marc said...

Thanks Nigel.

By the way, I did not know about your blog. I just subscribed to it. Looks like you have some good stuff there.