public class SqsConsumer
extends org.apache.camel.impl.ScheduledBatchPollingConsumer
Constructor and Description |
---|
SqsConsumer(SqsEndpoint endpoint,
org.apache.camel.Processor processor) |
Modifier and Type | Method and Description |
---|---|
protected Queue<org.apache.camel.Exchange> |
createExchanges(List<com.amazonaws.services.sqs.model.Message> messages) |
protected void |
doShutdown() |
protected void |
doStart() |
protected com.amazonaws.services.sqs.AmazonSQS |
getClient() |
protected SqsConfiguration |
getConfiguration() |
SqsEndpoint |
getEndpoint() |
protected String |
getQueueUrl() |
protected int |
poll() |
int |
processBatch(Queue<Object> exchanges) |
protected void |
processCommit(org.apache.camel.Exchange exchange)
Strategy to delete the message after being processed.
|
protected void |
processRollback(org.apache.camel.Exchange exchange)
Strategy when processing the exchange failed.
|
void |
reConnectToQueue() |
String |
toString() |
deferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPoll
afterPoll, beforePoll, doStop, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, 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
doResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public SqsConsumer(SqsEndpoint endpoint, org.apache.camel.Processor processor) throws org.apache.camel.NoFactoryAvailableException
org.apache.camel.NoFactoryAvailableException
protected int poll() throws Exception
poll
in class org.apache.camel.impl.ScheduledPollConsumer
Exception
public void reConnectToQueue()
protected Queue<org.apache.camel.Exchange> createExchanges(List<com.amazonaws.services.sqs.model.Message> messages)
protected void processCommit(org.apache.camel.Exchange exchange)
exchange
- the exchangeprotected void processRollback(org.apache.camel.Exchange exchange)
exchange
- the exchangeprotected SqsConfiguration getConfiguration()
protected com.amazonaws.services.sqs.AmazonSQS getClient()
protected String getQueueUrl()
public SqsEndpoint getEndpoint()
getEndpoint
in interface org.apache.camel.EndpointAware
getEndpoint
in class org.apache.camel.impl.DefaultConsumer
public String toString()
toString
in class org.apache.camel.impl.DefaultConsumer
protected void doStart() throws Exception
doStart
in class org.apache.camel.impl.ScheduledPollConsumer
Exception
Apache Camel