public class BeanstalkConsumer
extends org.apache.camel.impl.ScheduledPollConsumer
Exchange
completion. The behavior is configurable by consumer.awaitJob
flag (by default true
)
This consumer will add a Synchronization
object to every Exchange
object it creates in order to react on successful exchange completion or failure.
In the case of successful completion, Beanstalk's delete
method is
called upon the job. In the case of failure the default reaction is to call
bury
.
The reaction on failures is configurable: possible variants are "bury", "release" or "delete"Constructor and Description |
---|
BeanstalkConsumer(BeanstalkEndpoint endpoint,
org.apache.camel.Processor processor) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
BeanstalkEndpoint |
getEndpoint() |
BeanstalkCommand |
getOnFailure() |
boolean |
isAwaitJob() |
boolean |
isUseBlockIO() |
protected int |
poll() |
protected void |
resetClient() |
void |
setAwaitJob(boolean awaitJob) |
void |
setOnFailure(BeanstalkCommand onFailure) |
void |
setUseBlockIO(boolean useBlockIO) |
afterPoll, beforePoll, doShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, processEmptyMessage, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toString
doResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public BeanstalkConsumer(BeanstalkEndpoint endpoint, org.apache.camel.Processor processor)
protected int poll() throws Exception
poll
in class org.apache.camel.impl.ScheduledPollConsumer
Exception
public BeanstalkCommand getOnFailure()
public void setOnFailure(BeanstalkCommand onFailure)
public boolean isUseBlockIO()
public void setUseBlockIO(boolean useBlockIO)
public boolean isAwaitJob()
public void setAwaitJob(boolean awaitJob)
public BeanstalkEndpoint getEndpoint()
getEndpoint
in interface org.apache.camel.EndpointAware
getEndpoint
in class org.apache.camel.impl.DefaultConsumer
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.ScheduledPollConsumer
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.impl.ScheduledPollConsumer
Exception
protected void resetClient()
Apache Camel