Mule Transactions for Reliable Message processing in CloudHub

  • Written By WHISHWORKS
  • 27/04/2015

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.

Scenario:

  • 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

Mule Transactions for Reliable Message processing in CloudHub

VM Transaction Configuration

Mule Transactions for Reliable Message processing in CloudHub
  • Configuration in the above step will facilitate
  1. Message would be resent by “MQ” broker in-case there is an exception in acquisition flow.
  2. 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 marketing@whishworks.com

Other useful links:

WHISHWORKS Systems Integration

API Recipes with MuleSoft Anypoint Platform

Case studies 

Latest Insights

Blogs

Introduction to: Event Streaming

In this blog we introduce the key components of event streaming, including outlining the differences between traditional batch data processing and real-time event streaming.

Dynamic Overlay for PDF Template
Blogs

Developer’s guide: creating a dynamic overlay for a PDF template

In this blog, we provide a step-by-step solution to dynamically changing the template of a PDF document using the open source software PDFbox.

Infographic Kafka banking
Blogs

Transforming Banking with Apache Kafka

In this blog (and infographic) we summarise the key takeaways from that webinar, showcasing how forward-looking banks are getting ahead of the curve with real-time streaming.