You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyone has integrated IBM MQ with Easy Batch, please?
Could you share the experience on how to deal with distributed transaction scenario. For example, read message in Reader class, and deal with some persistence operations in Processor, or Writer in TRANSACTION mode. BTW, I am using Easy-Batch 4.0 version.
Thanks in advance
The text was updated successfully, but these errors were encountered:
czhifa
changed the title
How to implement distributed transaction between easy batch and MQ?
How to implement distributed transactions between Easy Batch and IBM MQ?
Mar 31, 2020
@czhifa I never worked with IBM MQ, but I can give some hints.
For example, read message in Reader class, and deal with some persistence operations in Processor, or Writer in TRANSACTION mode.
I would not recommend doing persistence operations in a record processor, it is better to implement them in a writer.
There is no global transactions in Easy Batch. What you can do is read a message from a queue, and if the transaction fails in the writer, send the item back to the queue for reprocessing (you can use the record header to add some infos like the number of times the record has been retried, etc).
This is basically the compensating action pattern, which is in my experience easier to implement and reason about than distributed transactions and 2PC. You can find some references here: Compensating Transaction pattern and Sagas. Hope this helps.
Anyone has integrated IBM MQ with Easy Batch, please?
Could you share the experience on how to deal with distributed transaction scenario. For example, read message in Reader class, and deal with some persistence operations in Processor, or Writer in TRANSACTION mode. BTW, I am using Easy-Batch 4.0 version.
Thanks in advance
The text was updated successfully, but these errors were encountered: