THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We have learned about using Camel to do routing inside ServiceMix, but is also possible excerpt INLINE
use Apache Camel's optional components inside ServiceMix
...
Using MINA for plain TCP communication
...
To be able to use camel-mina, we will specify if as a <dependency/>
in our tutorial-camel-su
's pom.xml
file:
...
Coding the new routes
Let's look at the necessary modifications to our RouteBuilder
implementation:
...
...
- The only thing we need to know for using our new component in our Camel routes is a new URI format. This line will start a socket listener on port 10021 of our local machine...
- ... and send the incoming message exchanges to our JMS consumer provider endpoint using the
jbi:
URI we learned about on the previous page. Camel will take care of converting the XML String into a valid JBIMessageExchange
once again. - Finally, we also change the final
.to()
of ourtimer:
route to send the message through the socket listener that was started at (1).
...