NMRPage edited by Gert VanthienenChanges (1)
Full ContentNMR ComponentThe nmr component is an adapter to the Normalized Message Router (NMR) in ServiceMix, which is intended for use by Camel applications deployed directly into the OSGi container. By contrast, the JBI component is intended for use by Camel applications deployed into the ServiceMix JBI container. InstallingThe NMR component is provided with Apache ServiceMix. It is not distributed with Camel. To install the NMR component in ServiceMix, enter the following command in the ServiceMix console window: features install nmr You also need to instantiate the NMR component. You can do this by editing your Spring configuration file, META-INF/spring/*.xml, and adding the following bean instance:
For more details of valid NMR URIs see the ServiceMix URI Guide. Using the nmr:service: or nmr:endpoint: URI formats sets the service QName on the JBI endpoint to the one specified. Otherwise, the default Camel JBI Service QName is used, which is:
{http://activemq.apache.org/camel/schema/jbi}endpoint
URI Options
Examplesnmr:service:http://foo.bar.org/MyService nmr:endpoint:urn:foo:bar:MyService:MyEndpoint nmr:endpoint:http://foo.bar.org/MyService/MyEndpoint nmr:name:cheese Using Stream bodiesIf you are using a stream type as the message body, you should be aware that a stream is only capable of being read once. So if you enable DEBUG logging, the body is usually logged and thus read. To deal with this, Camel has a streamCaching option that can cache the stream, enabling you to read it multiple times.
from("jbi:endpoint:http://foo.bar.org/MyService/MyEndpoint").streamCaching().to("xslt:transform.xsl", "bean:doSomething");
From Camel 1.5 onwards, the stream caching is default enabled, so it is not necessary to set the streamCaching() option. See Also
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > NMR confluence
- [CONF] Apache Camel > NMR confluence
- [CONF] Apache Camel > NMR confluence
- [CONF] Apache Camel > NMR confluence
- [CONF] Apache Camel > NMR confluence