public class AmqpInboundChannelAdapter
extends org.springframework.integration.endpoint.MessageProducerSupport
implements org.springframework.integration.context.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, lifecycleLock| Constructor and Description |
|---|
AmqpInboundChannelAdapter(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer listenerContainer) |
| Modifier and Type | Method and Description |
|---|---|
int |
afterShutdown() |
int |
beforeShutdown() |
protected void |
doStart() |
protected void |
doStop() |
java.lang.String |
getComponentType() |
protected org.springframework.core.AttributeAccessor |
getErrorMessageAttributes(org.springframework.messaging.Message<?> message) |
protected void |
onInit() |
void |
setBatchingStrategy(org.springframework.amqp.rabbit.batch.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(org.springframework.amqp.support.converter.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, toStringpublic AmqpInboundChannelAdapter(org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer listenerContainer)
public void setMessageConverter(org.springframework.amqp.support.converter.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(org.springframework.amqp.rabbit.batch.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 java.lang.String getComponentType()
getComponentType in interface org.springframework.integration.support.context.NamedComponentgetComponentType in class org.springframework.integration.context.IntegrationObjectSupportprotected void onInit()
onInit in class org.springframework.integration.endpoint.MessageProducerSupportprotected void doStart()
doStart in class org.springframework.integration.endpoint.MessageProducerSupportprotected void doStop()
doStop in class org.springframework.integration.endpoint.MessageProducerSupportpublic int beforeShutdown()
beforeShutdown in interface org.springframework.integration.context.OrderlyShutdownCapablepublic int afterShutdown()
afterShutdown in interface org.springframework.integration.context.OrderlyShutdownCapableprotected org.springframework.core.AttributeAccessor getErrorMessageAttributes(org.springframework.messaging.Message<?> message)
getErrorMessageAttributes in class org.springframework.integration.endpoint.MessageProducerSupport