JMS consumer: This is a servicemix-jms listening on queue "A". Any
incoming messages to this queue will be routed to the next component in the
flow chain, the content-based router.
??? ???
Chapter 15
[ 297 ]
Content-based router router: The content-based router is a uter ter servicemix-eip
component. Based on the content of the XML message it receives, it will
route the message, unaltered, to any one amongst the set of Receiver
components configured.
Receiver: The receiver component is a custom transform component. Any
message it receives will be logged into the console and then echoed by
writing back to the out message of the In-Out. The out message is placed in
the out queue.
JMS provider: This is a servicemix-jms listening on queue "B". The receiver
component will place its out message onto this queue from where the
JMS client can pick up (even though in this sample we don't pick up
the messages).
Sample Code and Configuration
We configure the content-based router in the servicemix.xml file, along with other
components described above. This is shown in the following code:
Pages:
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411