Mule Transactions for Reliable Message processing in CloudHub:
Messages read from message brokers need to be processed reliably by ESBs with zero message loss. Messages can be lost because of multiple reasons, including but not limited to, network failures, long running integration flows with no feedback about processing.
Mule ESB, if configured with transactions can provide reliable message processing with zero message loss by using VMs. This approach is also helpful for load balancing and fail-over in CloudHub.
- When designing any integration flow with message source as an MQ server, two flows need to be modelled – Message Acquisition flow and Message Processing flow
- While modeling the acquisition flow, de-queue the message from Message broker and persist it in VM. Here, any Connector which supports transactions can be assumed in the place of JMS
- Configure transactions for both JMS and VM connector components in the message acquisition flow as shown below. The transaction should begin once the message arrives into flow. VM component should always join the existing transaction.
JMS Transaction Configuration
VM Transaction Configuration
- Configuration in the above step will facilitate
- Message would be resent by “MQ” broker in-case there is an exception in acquisition flow.
- Message would be resent in case the message acknowledgement is lost in the network.
- Keep the acquisition flow as simple as possible to improve the performance and reduce coupling with the source system.
- Model the processing part in a separate flow with the same VM queue (modelled as outbound in message acquisition flow) as inbound connector. The processing flow can also contain transactions based on the business need.
- As and when the message is acquired by the acquisition flow, even if the current active worker goes down, the request gets routed to a different worker in CloudHub which realizes load balancing and fail over.
- According to the details mentioned above, the modelling integration flows increases the transaction reliability of the integration flows and increases system resilience.
Conclusion: Mule transactions can be used with message persistence by VMs to ensure reliable message processing, performance and no message loss. This reliable way of message processing is needed by the enterprise applications, where data loss is unacceptable.
If you would like to find out more about how Systems Integration could help you make the most out of your current infrastructure while enabling you to open your digital horizons, do give us a call at +44 (0)203 475 7980 or email us at email@example.com.
Other useful links: