DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Key Takeaways From Integrating a RAG Application With LangSmith
  • Improving Java Application Reliability with Dynatrace AI Engine
  • Enabling Single-Sign-On in SaaS Application
  • Reimagining Innovation: How Citizen Application Development is Reshaping the Modern Enterprise

Trending

  • Self-Hosted Inference Doesn’t Have to Be a Nightmare: How to Use GPUStack
  • What Nobody Tells You About Multimodal Data Pipelines for AI Training
  • 11 Agentic Testing Tools to Know in 2026
  • Scaling Cloud Data Automation: A Practical Guide to Open Table Formats

Reliability Pattern in Mule

This article talks about ensuring the reliability of your HTTP application with the reliability pattern provided by Mule.

By 
Anupam Gogoi user avatar
Anupam Gogoi
·
Aug. 04, 17 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
12.8K Views

Join the DZone community and get the full member experience.

Join For Free

A reliable application is one that can not tolerate a single loss of information. For an application to be reliable, apart from the underlying ESB being highly reliable, it is necessary that the connections made by the application to other services must be reliable too. If the application uses a transactional transport such as JMS, VM, or JDBC, reliable messaging is ensured by the built-in support for transactions in the transports. This means that you can configure a transaction on a JMS inbound endpoint that makes sure messages are only removed from the JMS server when the transaction is committed.

However, most of the time, we use connections that are not reliable. For example, HTTP transport. How would you ensure reliability in an HTTP application? This is the point of discussion of this article.

Reliability Pattern

The reliability pattern provided by Mule ensures that the messaging is reliable for an application even though application receives messages from a non-transactional transport. Here comes the best use of VM connector.

Scenario

Let's assume the simplest virtual scenario as depicted below:

Image title

In the scenario above, we receive an order on an HTTP endpoint. Then we log the order, and finally, send the order to SalesForce for further processing. Our application must be highly reliable, i.e we can not lose a single piece of order information.

Now assume that the application has received an order information and suddenly the Mule ESB went down. So, your order is definitely gone. How do you tackle this problem? Here is how the Reliability Pattern comes into play.

Refactor the Application

Let's refactor the above application as shown below:

Image title

This approach is exactly same as using JMS queue. But fortunately, by using the VM Connector in Mule, you don't incur the administrative cost and performance overhead of running a separate JMS Broker.

You can make the VM Connector persistent by applying the Queue Store configuration as shown below:

Image title

In my case, the message passed over the queue (orderqueue in the example) will be persisted to the disk of the machine. So in the event of a Mule shutdown or failure, it will still be delivered to the HTTP outbound endpoint.

Also, the characteristics of how the VM transport stores its messages can be configured by defining the queue profile VM connector.

Conclusion

Using just the simple VM Connector provided by Mule, a simple non-transactional flow can be made highly reliable. Also, instead of using the VM Connector, the JMS connector can also be used to implement the reliability pattern.

application

Opinions expressed by DZone contributors are their own.

Related

  • Key Takeaways From Integrating a RAG Application With LangSmith
  • Improving Java Application Reliability with Dynatrace AI Engine
  • Enabling Single-Sign-On in SaaS Application
  • Reimagining Innovation: How Citizen Application Development is Reshaping the Modern Enterprise

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook