Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Camel supports implementing the Polling Consumer from the EIP patterns in the Component/Endpoint.

Image Removed

using the PollingConsumer interface which can be created via the Endpoint.createPollingConsumer() method.

Image Added

So in your Java code you can do

Code Block

Endpoint endpoint = context.getEndpoint("activemq:my.queue");
PollingConsumer consumer = endpoint.createPollingConsumer();
Exchange exchange = consumer.receive();

Scheduled Poll Components

Quite a few inbound Camel endpoints use a scheduled poll Most inbound Camel endpoints use this pattern to receive messages and push them through the Camel processing routes. Since this a such a common pattern, polling components can extend the PollingConsumer ScheduledPollConsumer base class which makes it simpler to implement this pattern.

There is also the Quartz Component which provides scheduled delivery of messages using the Quartz enterprise scheduler.

For more details see

...