public class AmqpInboundChannelAdapter extends MessageProducerSupport implements OrderlyShutdownCapable
| Modifier and Type | Class and Description |
|---|---|
protected class |
AmqpInboundChannelAdapter.BatchListener |
static class |
AmqpInboundChannelAdapter.BatchMode
Defines the payload type when the listener container is configured with consumerBatchEnabled.
|
protected class |
AmqpInboundChannelAdapter.Listener |
lifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerDEFAULT_PHASE| Constructor and Description |
|---|
AmqpInboundChannelAdapter(AbstractMessageListenerContainer listenerContainer) |
| Modifier and Type | Method and Description |
|---|---|
int |
afterShutdown()
Called after normal shutdown of schedulers, executors etc,
and after the shutdown delay has elapsed, but before any
forced shutdown of any remaining active scheduler/executor
threads.Can optionally return the number of active messages
still in process.
|
int |
beforeShutdown()
Called before shutdown begins.
|
protected void |
doStart()
Take no action by default.
|
protected void |
doStop()
Take no action by default.
|
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
protected AttributeAccessor |
getErrorMessageAttributes(Message<?> message)
Populate an
AttributeAccessor to be used when building an error message
with the errorMessageStrategy. |
protected void |
onInit()
Subclasses may implement this for initialization logic.
|
void |
setBatchingStrategy(BatchingStrategy batchingStrategy)
Set a batching strategy to use when de-batching messages created by a batching
producer (such as the BatchingRabbitTemplate).
|
void |
setBatchMode(AmqpInboundChannelAdapter.BatchMode batchMode)
When the listener container is configured with consumerBatchEnabled, set the payload
type for messages generated for the batches.
|
void |
setBindSourceMessage(boolean bindSourceMessage)
Set to true to bind the source message in the header named
IntegrationMessageHeaderAccessor.SOURCE_DATA. |
void |
setHeaderMapper(AmqpHeaderMapper headerMapper) |
void |
setMessageConverter(MessageConverter messageConverter) |
void |
setRecoveryCallback(org.springframework.retry.RecoveryCallback<?> recoveryCallback)
Set a
RecoveryCallback when using retry within the adapter. |
void |
setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
Set a
RetryTemplate to use for retrying a message delivery within the
adapter. |
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherdestroy, doStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBeanName, getComponentNamepublic AmqpInboundChannelAdapter(AbstractMessageListenerContainer listenerContainer)
public void setMessageConverter(MessageConverter messageConverter)
public void setHeaderMapper(AmqpHeaderMapper headerMapper)
public void setRetryTemplate(org.springframework.retry.support.RetryTemplate retryTemplate)
RetryTemplate to use for retrying a message delivery within the
adapter. Unlike adding retry at the container level, this can be used with an
ErrorMessageSendingRecoverer RecoveryCallback to publish to the
error channel after retries are exhausted. You generally should not configure an
error channel when using retry here, use a RecoveryCallback instead.retryTemplate - the template.setRecoveryCallback(RecoveryCallback)public void setRecoveryCallback(org.springframework.retry.RecoveryCallback<?> recoveryCallback)
RecoveryCallback when using retry within the adapter.recoveryCallback - the callback.setRetryTemplate(RetryTemplate)public void setBatchingStrategy(BatchingStrategy batchingStrategy)
SimpleBatchingStrategy.batchingStrategy - the strategy.public void setBindSourceMessage(boolean bindSourceMessage)
IntegrationMessageHeaderAccessor.SOURCE_DATA.bindSourceMessage - true to bind.public void setBatchMode(AmqpInboundChannelAdapter.BatchMode batchMode)
AmqpInboundChannelAdapter.BatchMode.MESSAGES.batchMode - the batch mode.public String getComponentType()
IntegrationObjectSupportgetComponentType in interface NamedComponentgetComponentType in class IntegrationObjectSupportprotected void onInit()
IntegrationObjectSupportonInit in class MessageProducerSupportprotected void doStart()
MessageProducerSupportdoStart in class MessageProducerSupportprotected void doStop()
MessageProducerSupportdoStop in class MessageProducerSupportpublic int beforeShutdown()
OrderlyShutdownCapablebeforeShutdown in interface OrderlyShutdownCapablepublic int afterShutdown()
OrderlyShutdownCapableafterShutdown in interface OrderlyShutdownCapableprotected AttributeAccessor getErrorMessageAttributes(Message<?> message)
MessageProducerSupportAttributeAccessor to be used when building an error message
with the errorMessageStrategy.getErrorMessageAttributes in class MessageProducerSupportmessage - the message.