Batch registration using WMQ transport with Mule ESB

My requirement is to read the csv and send some XML messages to IBM mq.

xmls generated from csv must ship in the same batch or transaction. The reason the system reads these messages is not idempotent, and in case of sending any xml messages and the rest fail. I need to save the failed XML messages for manual reprogramming.

It would be great if someone could point me to a function where multiple xml messages can be queued as one batch.

+3


source to share


1 answer


You seem to have conflicting requirements.

Sending messages in a batch is easy. You will put them under sync, then enter COMMIT

. As long as there are no more messages than queue depth or UOW transaction limits, you are fine.

Getting them in the party is another matter entirely. IBM MQ has a message group and a parameter BIND_ON_OPEN

to ensure that all child messages have moved to the same location and can be counted.

So far this has been easy and based on options in the underlying MQ API or JMS API. The big problem I see is the claim that "the system reading these messages is not idempotent," which is a fancy way of saying that it does not detect and gracefully handles error messages. This is a problem with any async message wrap unless XA is used. It should either handle error messages gracefully or use a transaction coordinator to ensure there are no error messages. I am assuming at this point that you are using two-phase commit to meet this requirement.



Another potential problem arises because "I need to save the invalid XML messages for manual reprogramming." Not sure what "manual processing" means. IBM MQ will save messages, just mark them as such when you PUT

queue. When QMgr is restored, messages will be delivered. However, this statement seems to indicate a high availability or disaster recovery requirement so that messages are replicated.

So the short answer is to choose persistence as the message property when posting the message and when doing two-phase commit.

The longer answer depends on what the idempotency and recovery links are referring to. If there are requirements here, you will need to add a detail to the question.

+1


source







All Articles