Error handling in event driven systems like Mule can be a challenge to understand, if you have worked with Mule you’ll know that there are exception strategies and this post will help you get the most out of them.

How error handling works in Mule

Note: In this blog we are going to talk about since it’s the preferred configuration style but the same applies to services.

Mule errors are represented by exceptions, so when your transformer, endpoint or any other processor fails it throws an exception. When an exception is thrown, you need a way to manage it. In Mule, the key is <default-exception-strategy> element. Once an exception is thrown normal flow execution will stop and will continue processing on the exception strategy. Inside it you can put message processors to do whatever you want to handle the exception. Currently <default -exception-strategy> only allows one message processor, but you can overcome this issue by using a <processor-chain> element.

I’m a big fan of good integration in all shapes and forms.  Quite often integration is done behind the scenes and if done well it remains unnoticed. I was thinking about social enterprise and the role of integration and decided to dig into some of the major players, namely Yammer and SocialText.  SocialText realised early on that integration is hugely important in order to provide the best user experience and call it out directly in their vision.

When looking at Yammer I stumbled across their Microsoft SharePoint integration, which really impressed me.  Now my views are subjective since I haven’t used Yammer and SharePoint together, but what I liked about their approach is they obeyed my 5 rules of good UI integration:

Ramiro Rinaudo on Friday, December 9, 2011

Mule 3.2.1 Released


This is a quick note to let you know that we have released Mule 3.2.1 Community and Enterprise.  This is a maintenance release focusing on reliability and performance. Highlights of the new release include:

  • Improved performance for Mule’s out-of-the-box active-active High Availability Clusters.
  • An enhanced Business Event Analyzer, adding improved readability and and usability to its view into business transactions and KPIs 
  • Over 120 improvements and issues closed

For a full list of enhancements view the release notes.

Download: Mule Community or Mule Enterprise (includes HA, Business Event Analyzer and the Management Console).

Karan Malhi on Thursday, December 8, 2011

Load Balancing Apache Tomcat using IIS


Front-ending Apache Tomcat with Apache Web Server or is sometimes thought to improve performance. However, performance of standalone has already been known to be very good. So why add IIS or Apache web server in front of it? – the answer is scalability and maintenance. Front-ending Tomcat with such web servers allows you to add more instances in case of increased load and also bring down instances for maintenance/upgrades.

This blog shows you end-to-end, step-by-step detailed instructions on setup such an environment. It should take you about an hour to configure this setup for yourself. Follow the instructions slowly and carefully to make sure you do not skip/miss any step. Here is a higher level view of the setup.

We provide a lot of webinars with tips and tricks from our development team on how Mule works across various industries. But what about in the media and entertainment sector? We’re pleased to present a great customer use case of Mule in the wild world of entertainment.

Distributed systems are great: they’re more versatile and resilient than monolithic ones. They also bring challenges of their own, one of them being the difficulty of building a holistic picture of the systems and interactions involved in the processing of a request or the execution of a business activity.

Business process modeling and their reification in business process engines can help a lot in this matter. But these engines are not pervasively used and there are still blind spots, like in network interactions, that need to be addressed.

In this blog, we’ll look at the usage of correlation identifiers as the means to keeping track of what’s happening in a distributed topology. And of course, we’ll also look at how Mule can help you keep an eye on your messages!

When you send a request to an API and it gets processed the API might want to notify you app about the status of the request. In order for your to handle this callback you would have to set up an endpoint to listen for the notification and then send the url of that endpoint to the API. For example Twilio, one of the most popular public APIs, uses callbacks to tell you whether a SMS message has been successfully delivered or not in addition to a SMS id that you can use later for tracking purposes. Since the goal of the new Mule DevKit is to make things simpler it provides an easy way to handle HTTP callbacks.

You might have noticed that under certain circumstances Mule will add its own Soap Headers to the calls. This can be a problem in some situations. For example, let’s say I’m communicating with a remote web service that is not expecting these extra headers. This will probably result in a validation failure and leave me unable to communicate with the web service. Fortunately there is a way to avoid the unwanted headers, which is what we’ll be discussing now.

john.demic on Wednesday, November 30, 2011

Implementing Custom Validation with DevKit


Validating data can be easy with Mule if your message payloads are in certain formats.  XML payloads, for instance, can be verified for correctness via XML schema or XPath filters. Payload type filters and OGNL expression evaluation can go a long way in asserting your POJO payloads are correct.
Payloads with less structure, like Map or JSON data, are a little bit trickier to validate.  This is particularly true on the front-end of web-services where leniency in data format, particularly JSON, can be beneficial.  In these cases a custom Message Processor is usually necessary to filter or sanitise the data.

Application stacks are so passé, now its all about the slice. With the rise of open APIs we are seeing a new breed of . Infrastructure APIs are cropping up everywhere for doing things like , FTP, monitoring and management, analytics and application security.  These slices of functionality, delivered as services, remove the time consuming need to set up services locally and allow developers to spend their time building their application. Adoption of these infrastructure APIs means application architecture doesn’t look the same as it did. Piece by piece the sub systems for an application such as data, security, user management, , integration and messaging are being hosted outside the application. Furthermore, there is a wealth of new services available to applications providing new capabilities such as telephony, facial recognition, address validation, geocoding/geolocation, social media mining, carbon footprint calculators – pretty much anything you need and more to build your killer app. This means application development is becoming a lot more about composition of of open APIs, not coding it all yourself.