이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 18. Inter-Bundle Communication with the NMR


Abstract

Red Hat JBoss Fuse provides a non-standard mechanism to support asynchronous messaging, known as the Normalized Message Router (NMR), which is loosely based on the NMR defined in the JBI standard. The NMR has the advantage that it spans both the OSGi container and the JBI container. By contrast, the OSGi Event Admin Service, which also provides asynchronous communication between bundles, can only be used within the OSGi container.

18.1. Architecture of the NMR

Overview

Figure 18.1, “NMR Architecture” shows a general overview of the NMR architecture, which spans both the OSGi container and the JBI container.

Figure 18.1. NMR Architecture

In Figure 18.1, “NMR Architecture”, 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.

NMR

The Red Hat JBoss Fuse 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 JBoss Fuse NMR can be used to transmit XML messages, optionally augmented with properties and attachments.

NMR for OSGi

Unlike the standard NMR, however, the JBoss Fuse 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.

Normalized messages in the JBI container

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.

Normalized messages in the OSGi container

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.

NMR API

Red Hat JBoss Fuse 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.

NMR component for Apache Camel

To enable integration with the NMR, Apache Camel 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 Section 18.2, “The Apache Camel NMR Component”.
Note
The NMR component is designed specifically for integrating Apache Camel with the NMR within the OSGi container. If you deploy a Apache Camel 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 nmr URI scheme, whereas the JBI component (for use in a JBI context) is conventionally identified by the jbi URI scheme.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat