We have learned about using Camel to do routing inside ServiceMix, but is also possible use Apache Camel's optional components inside ServiceMix
ServiceMix itself doesn't have a JBI component to do plain TCP communications, but Camel does have an Apache MINA component that allows you to do this. This component is available as a separate JAR file, so we will have to first add it to our SU. Afterwards, we can just start using it in our routes.
To be able to use camel-mina, we will specify if as a <dependency/> in our tutorial-camel-su's pom.xml file:
Let's look at the necessary modifications to our RouteBuilder implementation:
jbi: URI we learned about on the previous page. Camel will take care of converting the XML String into a valid JBI MessageExchange once again..to() of our timer: route to send the message through the socket listener that was started at (1).By now, you should have a basic idea of what is possible with ServiceMix and Camel. As a final appetizer, let us take a look at some of the other features before ending the tutorial.