IBM WebSphere MQ WCF Channels
See some update here: http://bloggingabout.net/blogs/gerben/archive/2010/12/20/ibm-websphere-mq-wcf-channels-updated.aspx
Windows Communication Foundation out of the box ships with quite some transport mechanisms. By default it comes with http, tcp, msmq, etc. A channel for the quite widely used IBM WebSphere MQ (WMQ) transport is missing.
To clarify terms up: the WCF thing that really puts the messages on the wire is generally referred to as a channel, transport or transport channel. To able to use that thing in WCF in config you need a binding. A transport combined with a binding is sometimes called an adapter.
Due to history or cross platform support quite some companies are still using WMQ. In the past I've extended WCF with a custom channel for WMQ for a company I worked for and that works fine. Though you actually don't want to build these kinds of things since they're quite complex. Especially if your need robust high volume processing. Luckily enough though both Microsoft and IBM have recently shipped a WCF transport for WMQ. Microsoft ships it with Host Integration Server (HIS) 2009 which is part of BizTalk. HIS is just the shipping vehicle, you don’t need it at runtime. IBM had a transport in alpha for while but it now ships it with WMQ version 7. I evaluated both of these transports and below is my comparison:
|
|
IBM
|
HIS2009
|
|
Fire-and-forget (oneway) client
|
+
|
+
|
|
Fire-and-forget (oneway) service
|
+
|
+
|
|
Request-reply client
|
+
|
-
|
|
Request-reply service
|
+
|
-
|
|
Local transactions
|
+
|
-
|
|
Distributed transactions (DTC)
|
-
|
+
|
|
Client side transactions (DTC)
|
-
|
+
|
|
Backout queue support
|
+
|
-
|
|
Message format
|
-
|
+
|
AppFabric support / IIS Hosting (WAS listener for IIS7) |
-
|
-
|
|
Works with .NET 3.x
|
+
|
+
|
|
Works with .NET 4.0
|
+
|
+
|
|
WMQ6 support
|
-
|
+
|
|
WMQ7 support
|
+
|
+
|
|
Sample code
|
+
|
+
|
|
Documentation
|
+
|
-
|
|
Licensing
|
+
|
-
|
Transaction support
Distributed transaction via DTC only supported in HIS component. Be aware though that you need the WMQ Extended Transactional Client for this, which comes with extra license costs and that HIS2009 doesn’t support backout queues. If the transaction fail it will start to retry indefinitely (poison message) unless you handle this yourself someway.
A local transaction means just that the get from the queue will not be committed in the case of an unhandled exception in the transport channel, WCF runtime or in your own service implementation code. IBM uses a WCF behavior to implement this.
Message format
The IBM channel ties the transport channel to messages with MQHRF2 header, JMS header and puts messages as JMS byte message on the queue. Not a real big surprise since the class name of the channel is "IBM.XMS.WCF.SoapJmsIbmTransportChannel". The IBM channel itself is able to receive messages without all this stuff. But a put on the queue will always be with all this stuff. Disabling via targetClient=1 in the JMS binding is currently not supported.
Sample code / documentation
HIS Channel:
- Samples after installation of “Host Integration Server 2009” or “BizTalk Server 2009 adapters for host systems” available in: \Program Files\Microsoft Host Integration Server 2009\SDK\Samples\MessageIntegration\MQChannel
- Documentation not available is work in progress. Channel is under the cover the same as the BizTalk MQ Series Client adapter, so maybe some documentation from that adapter applies for this one.
IBM.
- After install of WMQ 7 client in: \Program Files\IBM\WebSphere MQ\tools\wcf\samples
Documentation:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.csqzav.doc/un12000_.htm
Licensing
IBM: component is shipped with WMQ client or server version 7.
HIS:
Despite that you only need the assemblies and no BizTalk or HIS to get it working licensing is still via BizTalk. Cheapest way if you're just using the assemblies on a non BizTalk server is to go with the branch edition.
Details at:
http://download.microsoft.com/download/3/9/E/39EB3E63-997C-47CA-9316-AA0B6CD7F9B8/Microsoft%20Host%20Integration%20Server%202009%20FAQ.docx
http://www.microsoft.com/biztalk/en/us/pricing-licensing.aspx
Conclusion
It all looked very nice at first that both Microsoft and IBM are shipping a WCF channel for WMQ. Major disadvantages for me for the Microsoft one are the licensing model and that they don't support request-reply. The IBM channel doesn't have these problems but is missing WMQ 6, distributed transactions and non JMS support for puts on the other side.
Yes I know queues aren't meant for request-reply communication. But there are still quite some old systems around that only are accessible via WMQ, that's why I want request-reply over WMQ.
I know via the TAP that HIS2010 will add some new stuff to the WCF WMQ transport. I’ll update my comparison when HIS2010 is released.