public class AmqpMessageSource extends AbstractMessageSource<Object>
MessageSource
for RabbitMQ.Modifier and Type | Class and Description |
---|---|
static class |
AmqpMessageSource.AmqpAckCallback |
static class |
AmqpMessageSource.AmqpAckCallbackFactory |
static class |
AmqpMessageSource.AmqpAckInfo
Information for building an AmqpAckCallback.
|
IntegrationManagement.ManagementOverrides
EXPRESSION_PARSER, logger
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
AmqpMessageSource(ConnectionFactory connectionFactory,
AmqpMessageSource.AmqpAckCallbackFactory ackCallbackFactory,
String queue) |
AmqpMessageSource(ConnectionFactory connectionFactory,
String queue) |
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getMessageCount, getMessageCountLong, getOverrides, isCountsEnabled, isLoggingEnabled, receive, registerMetricsCaptor, reset, setBeanName, setCountsEnabled, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedType
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
messageCount
public AmqpMessageSource(ConnectionFactory connectionFactory, String queue)
public AmqpMessageSource(ConnectionFactory connectionFactory, AmqpMessageSource.AmqpAckCallbackFactory ackCallbackFactory, String queue)
protected boolean isTransacted()
public void setTransacted(boolean transacted)
transacted
- true for transacted.protected MessagePropertiesConverter getPropertiesConverter()
public void setPropertiesConverter(MessagePropertiesConverter propertiesConverter)
MessagePropertiesConverter
to replace the default
DefaultMessagePropertiesConverter
.propertiesConverter
- the converter.protected AmqpHeaderMapper getHeaderMapper()
public void setHeaderMapper(AmqpHeaderMapper headerMapper)
AmqpHeaderMapper
to replace the default
DefaultAmqpHeaderMapper.inboundMapper()
.headerMapper
- the header mapper.protected MessageConverter getMessageConverter()
public void setMessageConverter(MessageConverter messageConverter)
MessageConverter
to replace the default
SimpleMessageConverter
.messageConverter
- the converter.protected boolean isRawMessageHeader()
public void setRawMessageHeader(boolean rawMessageHeader)
AmqpMessageHeaderErrorMessageStrategy.AMQP_RAW_MESSAGE
, enabling callers to
have access to the message to process errors. The raw message is also added to the
common header IntegrationMessageHeaderAccessor.SOURCE_DATA
.rawMessageHeader
- true to include the headers.protected org.springframework.amqp.rabbit.batch.BatchingStrategy getBatchingStrategy()
public void setBatchingStrategy(org.springframework.amqp.rabbit.batch.BatchingStrategy batchingStrategy)
SimpleBatchingStrategy
.batchingStrategy
- the strategy.public String getComponentType()
protected AbstractIntegrationMessageBuilder<Object> doReceive()
AbstractMessageSource
payload
of
type T, but the returned value may also be a Message
instance whose payload is of type T;
also can be AbstractIntegrationMessageBuilder
which is used for additional headers population.doReceive
in class AbstractMessageSource<Object>