vendredi 20 février 2015

Apache Camel JmsComponent - How to check if there is a message in topic?

I have a camel route to consume a message from a JMS topic. When the route starts, and there is no message in the topic, I want to raise an exception and stop the process.


I'm using the JmsComponent from Apache Camel that use the DefaultMessageListenerContainer from Spring and is defined as transactional. The current behavior is that the route starts but it keeps waiting for a message indefinitely.


Is there any solution to check if the message exists and simply stop the route when absent?


Aucun commentaire:

Enregistrer un commentaire