The Mule team are really excited to announce Mule 3, the next generation open source ESB platform. It’s been a long time coming and the team have done a stellar job redefining what you should expect from an ESB. This release marks some significant new features as well as changes to Mule itself that result in the most powerful, light-weight and simple to use ESB out there.
I set a single theme for Mule 3 – simplify everything. We want to make Mule 3 more accessible to everyone. This meant making some big architectural strides as well as embracing new technologies and building new features into the core of Mule to make building integration applications a breeze. There is still more we’d like to do so expect simplicity to be at the forefront of forthcoming releases as well.
Mule 3 is packed with new features and enhancements. The team will be covering these in more depth here over the coming weeks. I’d like to highlight the major ones here.
Cloud connect is all about embracing the wealth of cloud/SaaS/Social Media applications that continue to impact our lives. We increasingly see the need for applications to interact with these services, creating rich connected applications.
- Cloud connectors – out-of-the-box connectors for popular cloud, SaaS, and Web 2.0 providers (e.g., Amazon Web Services and Facebook), as well as an easy way for users to create their own cloud connectors
- Native REST support – allows users to publish JAX-RS and consume RESTful services easily and seamlessly using Mule 3.
Data Bindings – new capabilities that allow XML and JSON data formats to be easily consumed and automatically bound to Java objects.
- ATOM and RSS – New features for consuming and creating feeds. This allows users to react to feeds as they are updated and create feeds from events in Mule.
- JSON Support – Mule 3 introduces JSON data handling. As well as adding JSON transformers, JSON data can automatically be marshaled into Java objects and back to JSON.
Flow is a new powerful way of creating message flows in Mule. Many people struggle with the rigid nature of the service model in Mule because they don’t naturally think in terms of services. Flow allows developers to create integration flows they way they think about solving the problem. We’ll be talking a lot more about this in future posts.
Patterns have always been at the core of Mule. The now well-known Enterprise Integration Patterns were first implemented by Mule back in 2004. Mule 3 sets a new level of pattern support by introducing Pattern-based configuration. These new patterns provide larger building blocks for performing common tasks such as publishing REST or RESTful Web Services, creating transactional bridges and configuring Web Service proxies.
Annotations support has been incorporated in to Mule that address a few specific areas.
- @Schedule annotation introduces a new way to schedule invocations of a method. This annotation supports cron or simple time intervals.
- @Transformer annotation now makes it really easy to define custom transformers from individual methods.
- Runtime injection annotations can now be used to inject message information into component and transformer methods. These annotations can query message headers, attachments and manipulate the payload.
- Expression annotations such as @XPath or @Groovy can be used to manipulate the message payload and perform automatic conversions when injecting message information into a component or transformer.
Mule has always been very flexible in the way that you can deploy the container either stand-alone or embedded in a Java application, or JEE server. One area for improvement though was the way in which you deploy applications to Mule. In Mule 3 I’m happy to say we now have some great deployment capabilities that make working with Mule more straight forward.
- New deployment model – provides an easy well-defined path for developers to work with Mule
- Automatic hot deployment – reduces friction during application deployment and provides immediate feedback during the development process, in addition to enabling dynamic application provisioning to running Mule servers.
- Service and application isolation – allows services to be changed at runtime without impacting other services
Under the hood we made changes to simplify the Mule architecture. The biggest change was the introduction of a unified interface for all service and flow objects, called Message Processors. While the core concepts and features of Mule remain the same, streamlining the architecture to use Message processors has opened up a lot of new possibilities for the platform.
Other changes include –
- Improved BPM – Mule Enterprise Service Bus integrates tightly with jBPM, allowing you to send/receive messages to/from a running process. A message from Mule can start or advance a process, the message can be used as a process variable, and a process can send messages to any endpoint in your Mule config.
- Dynamic Endpoints – Endpoints in Mule are now fully dynamic which means expressions can be used to read endpoint information such as host or port from the current message.
- Message Exchange Patterns – (a.k.a. MEPs) give you more explicit and flexible control over the way messages flow through Mule. For example, you can now specify whether you expect a response on a given endpoint or not (see the new attribute “exchange-pattern” on endpoints). In the future, we may introduce additional exchange patterns that allow for different communication styles as well.
- Message Property Scoping – Message properties are now scoped in either ‘inbound’, ‘invocation’, ‘outbound’ or ‘session’ scope. These scopes provide isolation and consistency to the way properties are attached to inbound and outbound messages.
- Lifecycle Improvements – Improves behaviour during startup and shutdown of applications, a very important aspect of hot deployment. We have also added support for JSR-250 lifecycle annotations @PostConstruct and @PreDestroy.
Exception Handling – Exception strategies were simplified to provide more consistent and predictable error-handling behavior.
- Automatic Transformation – The transformation engine has been enhanced to support Data bindings such as XML/JAXB and JSON/Jackson. Also Mime types are now supported when discovering transformers.
- Transaction Enhancements – Mule has always supported XA transactions but now a dedicated element has an attribte that tells Mule to pay attention to (or ignore) transactions started outside of Mule.
With any major software upgrade there are going to some migration issues. We worked very hard to ensure that the migration impact would be minimal. We kept backward compatibility with almost all service elements and endpoint elements. All other elements of the Mule configuration remain backward compatible. See the full list of every change from Mule 2.2 to Mule 3.
We did make some big changes in Web Services in order to make them easier and more flexible. This required an overhaul of the CXF module so if you are using Web Services you’ll need to familiarise yourself with the changes. I think you’ll agree the new way of doing things is much simpler.
The best thing about Mule has always been the open source community, we wouldn’t be where we are today without the great feedback, suggestions and bug reports that we get from our users. As we move forward with Mule your feedback is invaluable; after all it shapes our future releases. Please grab Mule 3, take it for a ride and let me know what you think (good or bad). You can either ping me directly ross at mulesoft dot com or use the community mailing list / forums.
Make sure you visit our blog frequently over the next few weeks as the team will be exploring each of these features in more depth.