Search code examples
javajmsapache-camelactivemq-classic

Intercept incoming JMS messages to ActiveMQ, reject/approve based on rules


Is there a feature in ActiveMQ, perhaps with Camel, to do the following?

  • intercept incoming message at the broker
  • validate headers and/or body based on arbitrary rules
  • throw exception to sender if message not validated, or..
  • reroute invalid messages to 'rejection' queue

Solution

  • You can use the ActiveMQ broker Camel component to interceptor messages within the broker and route them using Camel routes