Class AmqpMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<Object>
org.springframework.integration.amqp.inbound.AmqpMessageSource
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- BeanNameAware,- DisposableBean,- InitializingBean,- MessageSource<Object>,- IntegrationPattern,- NamedComponent,- IntegrationInboundManagement,- IntegrationManagement
A pollable 
MessageSource for RabbitMQ.- Since:
- 5.0.1
- Author:
- Gary Russell
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classInformation for building an AmqpAckCallback.Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagementIntegrationManagement.ManagementOverrides
- 
Field SummaryFields inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorEXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagementMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
- 
Constructor SummaryConstructorsConstructorDescriptionAmqpMessageSource(ConnectionFactory connectionFactory, String queue) AmqpMessageSource(ConnectionFactory connectionFactory, AmqpMessageSource.AmqpAckCallbackFactory ackCallbackFactory, String queue) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractIntegrationMessageBuilder<Object>Subclasses must implement this method.protected BatchingStrategyprotected AmqpHeaderMapperprotected MessageConverterprotected MessagePropertiesConverterprotected booleanprotected booleanvoidsetBatchingStrategy(BatchingStrategy batchingStrategy) Set a batching strategy to use when de-batching messages.voidsetHeaderMapper(AmqpHeaderMapper headerMapper) Set a customAmqpHeaderMapperto replace the defaultDefaultAmqpHeaderMapper.inboundMapper().voidsetMessageConverter(MessageConverter messageConverter) Set a customMessageConverterto replace the defaultSimpleMessageConverter.voidsetPropertiesConverter(MessagePropertiesConverter propertiesConverter) Set a customMessagePropertiesConverterto replace the defaultDefaultMessagePropertiesConverter.voidsetRawMessageHeader(boolean rawMessageHeader) Set to true to include the raw spring-amqp message as a header with keyAmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE, enabling callers to have access to the message to process errors.voidsetTransacted(boolean transacted) Set to true to use a transacted channel for the ack.Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSourcebuildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluatorafterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagementgetThisAs, isObserved, registerObservationRegistryMethods inherited from interface org.springframework.integration.core.MessageSourcegetIntegrationPatternType
- 
Constructor Details- 
AmqpMessageSource
- 
AmqpMessageSourcepublic AmqpMessageSource(ConnectionFactory connectionFactory, AmqpMessageSource.AmqpAckCallbackFactory ackCallbackFactory, String queue) 
 
- 
- 
Method Details- 
isTransactedprotected boolean isTransacted()
- 
setTransactedpublic void setTransacted(boolean transacted) Set to true to use a transacted channel for the ack.- Parameters:
- transacted- true for transacted.
 
- 
getPropertiesConverter
- 
setPropertiesConverterSet a customMessagePropertiesConverterto replace the defaultDefaultMessagePropertiesConverter.- Parameters:
- propertiesConverter- the converter.
 
- 
getHeaderMapper
- 
setHeaderMapperSet a customAmqpHeaderMapperto replace the defaultDefaultAmqpHeaderMapper.inboundMapper().- Parameters:
- headerMapper- the header mapper.
 
- 
getMessageConverter
- 
setMessageConverterSet a customMessageConverterto replace the defaultSimpleMessageConverter.- Parameters:
- messageConverter- the converter.
 
- 
isRawMessageHeaderprotected boolean isRawMessageHeader()
- 
setRawMessageHeaderpublic void setRawMessageHeader(boolean rawMessageHeader) Set to true to include the raw spring-amqp message as a header with keyAmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE, enabling callers to have access to the message to process errors. The raw message is also added to the common headerIntegrationMessageHeaderAccessor.SOURCE_DATA.- Parameters:
- rawMessageHeader- true to include the headers.
 
- 
getBatchingStrategy
- 
setBatchingStrategySet a batching strategy to use when de-batching messages. Default isSimpleBatchingStrategy.- Parameters:
- batchingStrategy- the strategy.
- Since:
- 5.2
 
- 
getComponentType
- 
doReceiveDescription copied from class:AbstractMessageSourceSubclasses must implement this method. Typically the returned value will be thepayloadof type T, but the returned value may also be aMessageinstance whose payload is of type T; also can beAbstractIntegrationMessageBuilderwhich is used for additional headers population.- Specified by:
- doReceivein class- AbstractMessageSource<Object>
- Returns:
- The value returned.
 
 
-