Reactive Extensions for Mule ESB.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

RxMule Logo

RxMule - Reactive Extensions for Mule ESB

Build Status Maven Central

Mule ESB specific bindings for RxJava.

The following demonstrates an asynchronous HTTP to Redis bridge, that only accepts one request per remote IP:

    .observeEndpointAsync(new URI("http://localhost:8080/publish"))
        muleEvent -> {

            final String remoteAddressAndPort =

            return substringBefore(remoteAddressAndPort, ":");
            muleEvent -> {


      "Published: {}", muleEvent);


This module adds a number of classes to RxJava that make it possible to observe:

RxMule also provides Func1 and Action1 wrappers to help processing Mule events with outbound Mule endpoints or Anypoint Connectors methods. On top of that RxMule, provides helpers for using message transformers and creating new messages from scratch.

In short, RxMule allows creating Observable<MuleEvent> instances from different sources. A MuleEvent is what Mule creates and processes. It wraps a MuleMessage which contains the actual data and meta-data that's being processed. Keep in mind that both objects are mutable, though only by the thread that is owning the event.

You can read more about the structure of a MuleMessage here.

Take a look at the integration tests to have a better idea of all you can do with RxMule.


Releases are available on Central. Snapshot builds are available in the Sonatype OSS Snapshots repository:


If you need to build the latest snapshot yourself, run:

mvn clean install

Note that some integration tests require a local instance of Redis running on port 6379. If Redis is not available there, these tests will self-disable.

You can quickly start a local Redis for tests with: docker run -d -p 6379:6379 --name redis redis and connect to it with: docker run -it --link redis:redis --rm redis sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"'

Copyright © 2015 David Dossot - MIT License