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

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • DGS GraphQL and Spring Boot
  • Auto-Instrumentation in Azure Application Insights With AKS
  • Deploying a Scala Play Application to Heroku: A Step-by-Step Guide
  • Why Mocking Sucks

Trending

  • Unlocking AI Coding Assistants Part 3: Generating Diagrams, Open API Specs, And Test Data
  • Beyond ChatGPT, AI Reasoning 2.0: Engineering AI Models With Human-Like Reasoning
  • Cookies Revisited: A Networking Solution for Third-Party Cookies
  • The Cypress Edge: Next-Level Testing Strategies for React Developers

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.5K 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

  • DGS GraphQL and Spring Boot
  • Auto-Instrumentation in Azure Application Insights With AKS
  • Deploying a Scala Play Application to Heroku: A Step-by-Step Guide
  • Why Mocking Sucks

Partner Resources

×

Comments

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

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: