Reading Time: 10 minutes

The Mule team is very pleased to announce the general availability of Mule ESB 3.1. This release packs a lot of new shiny awesomeness.

Cloud Connect

We received loads of great feedback on Mule Cloud Connect and the team has been working hard on new improvements. Cloud Connectors now have specific XML schemas making it really easy to orchestrate data services between cloud and enterprise applications. This means Cloud Connectors can now be used in flows. For example, to create a new Twitter component for use in a flow use the following:

<twitter:config name="jsontwitter" format="JSON" 
    consumerKey="${twitter.consumer.key}" 
    consumerSecret="${twitter.consumer.secret}"/>

latest report
Learn why we are the Leaders in API management and iPaaS

We’ve also made it easier to create custom cloud connectors by providing a development kit that consists of a set of tools for creating template Cloud Connector projects and for generating a Cloud Connect schema from an existing Java file (the JavaDoc gets used to document the XML schema). For more information take a look at creating Cloud Connectors.

Flow Orchestration

Mule 3 has powerful orchestration capabilities that enables users to integration with enterprise and cloud systems using Flow. We’ve made some important additions to flow to make it easy to consume and work with multiple services.

Poll

Mule has been able to poll data even with cron expressions from the early days. Now we have added a <poll> element to the Mule XML DSL to enable anything within a poll block to be scheduled for invocation. Currently only cloud Connector elements can be polled. For example, to search Twitter for the term ‘mule’ every 5 seconds:

Message Enrichment

Consider a message from a source system contains a ZIP code but the target system needs the two letter state. A message enricher can be used to lookup the state using the ZIP code from an enrichment resource. The enricher calls out to the enrichment resource with the current message (containing the zip code) then enriches the current message with the result.

Here the <message-enricher> defines a target variable called ‘state_short’ that will be used to store the result of the call to the ‘stateLookup’ outbound endpoint. Once this endpoint returns the result can be referenced later on in the flow using the same variable expresison #[variable:state_short].

Logging

Sometimes the simple things are great. we’ve added a new <logger> element that enables users to write any kind of output during the processing of a flow. Users cna write out simple Strings such us:

As you might have guess, Mule expressions can be embedded in the message so the message payload, headers or attachments can be written out:

Putting it all together

Once you start using Mule Cloud Connect and Flow together you can do some very cool stuff with little effort. The following example illustrates using the Twitter and Salesforce Cloud Connectors to create leads in Salesforce from Tweets with a specific keyword:

  • First, the flow polls Twitter every five seconds for new mule-related tweets.
  • Next, the splitter breaks out each individual tweet, and the idempotent filter ensures that we only process one message from each sender.
  • Now we log the name of each sender.
  • We enrich each message (remember, there’s now one message for each unique sender) with the sender’s Twitter profile information
  • Finally, we create a Salesforce opportunity for the sender, using the sender’s name and profile information

That’s two cloud services integrated in less that 20 lines with no coding needed. The new Cloud Connect schemas extend the Mule XML DSL making sure that the calls to the services are correct and all required fields are set, as will Mule you also get context sensitive help for all elements and attributes.

But there is more!

Mule 3.1 is a feature-packed release that includes lots of new functionality to enable your applications.

Web Services

Mule 3 dramatically simplified SOAP web services in Mule with the Simple Service configuration pattern and a new implementation of the CXF module leveraging the Mule 3 message processor architecture. In 3.1, Mule’s Web Service support has been upgraded. Most notably, Mule now supports WS-ReliableMessaging and asynchronous reply to endpoints for WS-Addressing and support for WS-Secure Conversation. Validation of web services has also been enhanced. You can now turn on validation of incoming SOAP messages with CXF through a new _validationEnabled_ configuration attribute.

Security Updates

Spring Security has been upgraded from 2.0.4 to 3.0.3. The behaviour is the same but there was some minore changes to the schema, check the 3.1 migration guide.

Additionally, we recently posted about a new Apache Shiro module for Mule 3.1

BPM Integration

Mule 3 provides strong orchestration capabilities with Flow, which is great for short-lived transaction where the goal is to maximize throughput and scalability. For other use cases like long running transaction, Mule has support for commercial and open source BPM products (like jBPM, Activiti, BonitaSoft BPM, etc.).

We made changes to the underlying BPM support starting with jBPM where the business process is now a component in Mule rather than a transport, this not only enables the use case when we are connecting to an external BPM engine but also enable the use case when using jBPM “inside” Mule to process messages. Incoming messages to the component automatically advance the process, and the running process can send messages to any outbound endpoint. See BPM Integration for more information.

We have also made progress on the Activiti BPM project, what this space for updates soon.

Performance and Bug Fixes

We made significant strides in performance tuning making 3.1 the fastest Mule ever. Plus more than 50 new bugs fixed since Mule 3.0, details about the fixes can be found in the release notes.

Mule can be downloaded here. As always we’d love to hear your feedback about the new release, you can post on the users forums, Twitter or even comment here on the blog.

Happy Muling!