|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PollingConsumerPollStrategy
Strategy for a PollingConsumer
when polling an Endpoint
.
rollback
method.
Method Summary | |
---|---|
boolean |
begin(Consumer consumer,
Endpoint endpoint)
Called when poll is about to begin |
void |
commit(Consumer consumer,
Endpoint endpoint,
int polledMessages)
Called when poll is completed successfully |
boolean |
rollback(Consumer consumer,
Endpoint endpoint,
int retryCounter,
Exception cause)
Called when poll failed |
Method Detail |
---|
boolean begin(Consumer consumer, Endpoint endpoint)
consumer
- the consumerendpoint
- the endpoint being consumed
void commit(Consumer consumer, Endpoint endpoint, int polledMessages)
consumer
- the consumerendpoint
- the endpoint being consumedpolledMessages
- number of messages polled, will be 0 if no message was polled at all.boolean rollback(Consumer consumer, Endpoint endpoint, int retryCounter, Exception cause) throws Exception
consumer
- the consumerendpoint
- the endpoint being consumedretryCounter
- current retry attempt, starting from 0.cause
- the caused exception
Exception
- can be used to rethrow the caused exception. Notice that thrown an exception will
terminate the scheduler and thus Camel will not trigger again. So if you want to let the scheduler
to continue to run then do not throw any exception from this method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |