When Camel consumes from JMS, does it use a JMS polling mechanism or a registered message listener?

Solution Verified - Updated -

Environment

  • Fuse Mediation Router 2.x

Issue

How does the camel-jms component retrieve messages from a JMS broker?
Does it use a polling mechanism, e.g.

javax.jms.MessageConsumer.receive();

or does it register a JMS MessageListener on the JMS Consumer?

Resolution

Camel internally uses Spring-JMS for all the low-level JMS work.
Spring-JMS uses the javax.jms.MessageConsumer.receive(long timeout) API to query for the next message.

Therefore a polling based mechanism is used.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.