Versions Compared

Key

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

...

ScheduledPollConsumer Options

...

  • begin
    • void begin(Consumer consumer, Endpoint endpoint)
  • begin (Camel 2.3)
    • boolean begin(Consumer consumer, Endpoint endpoint)
  • commit
    • void commit(Consumer consumer, Endpoint endpoint)
  • commit (Camel 2.6)
    • void commit(Consumer consumer, Endpoint endpoint, int polledMessages)
  • rollback
    • boolean rollback(Consumer consumer, Endpoint endpoint, int retryCounter, Exception e) throws Exception

In Camel 2.3 onwards the begin method returns a boolean which indicates whether or not to skipping polling. So you can implement your custom logic and return false if you do not want to poll this time.

In Camel 2.6 onwards the commit method has an additional parameter containing the number of message that was actually polled. For example if there was no messages polled, the value would be zero, and you can react accordingly.

The most interesting is the rollback as it allows you do handle the caused exception and decide what to do.

...