Figure 12.1 shows a general overview of the NMR architecture, which spans both the OSGi container and the JBI container.
In Figure 12.1, the NMR is represented as a horizontal graphical element in order to emphasize its role linking together various application bundles. In practice, however, the NMR is deployed as a collection of bundles, just like any other application in the OSGi container.
The Fuse ESB NMR is a general-purpose message bus used for transmitting messages between bundles in the OSGi container. It is modelled on the Normalized Message Router (NMR) defined in the Java Business Integration (JBI) specification. Hence, the Fuse ESB NMR can be used to transmit XML messages, optionally augmented with properties and attachments.
Unlike the standard NMR, however, the Fuse ESB NMR is not restricted to the JBI container. You can use the NMR to transmit messages inside the OSGi container or, if the JBI container is also deployed, to transmit messages between the two containers.
A key feature of the NMR message bus is that messages are transmitted in a standard, normalized form. The JBI standard defines a normalized message, which is based on the Web Services Description Language (WSDL) message format (both WSDL 1.1 and WSDL 2.0 formats are supported). A complete normalized message has the following aspects:
Content—the main content of a normalized message must be in XML format, where the layout of a particular message is defined in a WSDL service description.
Attachments—for sending binary content, you can add attachments to the normalized message.
Properties—consist of name/value pairs.
Security subject—identifies the sender, if security features are enabled.
In the OSGi container, normalized messages have a standard layout, as follows:
Content—the main content of a normalized message, which can be in any format.
Attachments—for sending binary attachments.
Properties—consist of name/value pairs.
Security subject—identifies the sender, if security features are enabled.
![]() | Note |
---|---|
When transmitting messages solely within the OSGi container, normalization of message content is not enforced. That is, the OSGi container does not impose any restrictions on the format of the message content. If messages are transmitted to an endpoint in the JBI container, however, message normalization must be observed. |
Fuse ESB provides a simple Java API for accessing the NMR. You can use this API to
define endpoints that process messages received from the NMR and you can write
clients that send messages to NMR endpoints. To see how to use this API in practice,
take a look at the examples/nmr
demonstration code.
To enable integration with the NMR, Fuse Mediation Router provides an NMR component, which lets
you define NMR endpoints either at the beginning (for example, as in
from("nmr:ExampleEndpoint")
) or at the end (for example,
to("nmr:ExampleEndpoint")
) of a route. For full details of how to
use the NMR component, see The Fuse Mediation Router NMR Component.
![]() | Note |
---|---|
The NMR component is designed specifically for integrating Fuse Mediation Router with the
NMR within the OSGi container. If you deploy a Fuse Mediation Router
application in the JBI container, however, NMR integration is provided by the
JBI component. The NMR component (for use in an OSGi context) is conventionally
identified by the |