How to make a transactional transition from Websphere MQ to .NET?

I am writing a client that receives messages from the Websphere MQ external queue and places them in the MSMQ internal queue. The client will use the MQ Client or, preferably, be purely managed (MQC.TRANSPORT_MQSERIES_MANAGED).

Based on an example from IBM , I have a version that can work with a simple IBM.WMQ.MQQueue.Get (...). How can this operation be performed as part of a transaction? I am thinking about using transactions other than XA.

+3
source share
1 answer

WMQ single-phase commit is activated using the MQC.MQPMO_SYNCPOINT flag when setting messages or the MQC.MQGMO_SYNCPOINT flag when receiving messages. To exit, call the Commite or Backout object of the queue manager object.

Link: The Backout and Commit methods in the MQQueueManager section of the manual.

As long as you use managed code, you are limited to single-phase commit. If you use unmanaged code in binding mode (using shared memory to talk to local WMQ QMgr), you can use XA. In this case, you will need to use the Begin method.

+5
source

All Articles