S
- the target AmqpPollableMessageChannelSpec
implementation type.public class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel> extends MessageChannelSpec<S,T>
MessageChannelSpec
for a AbstractAmqpChannel
s.Modifier and Type | Field and Description |
---|---|
protected AmqpChannelFactoryBean |
amqpChannelFactoryBean |
channel
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
AmqpPollableMessageChannelSpec(ConnectionFactory connectionFactory) |
Modifier and Type | Method and Description |
---|---|
S |
amqpMessageConverter(MessageConverter messageConverter) |
S |
channelTransacted(boolean channelTransacted)
Configure
channelTransacted on both the
RabbitTemplate (for sends) and
SimpleMessageListenerContainer
(for receives) when using Spring Integration 4.0. |
S |
defaultDeliveryMode(MessageDeliveryMode mode)
Configure the delivery mode for messages that don't have an
AmqpHeaders.DELIVERY_MODE header. |
protected T |
doGet() |
S |
encoding(String encoding) |
S |
extractPayload(boolean extract)
Configure whether normal spring-messaging to AMQP message mapping is enabled.
|
S |
headersMappedLast(boolean headersLast) |
protected S |
id(String id)
Configure the component identifier.
|
S |
inboundHeaderMapper(AmqpHeaderMapper mapper)
Configure the inbound header mapper to use when
extractPayload(boolean)
is true. |
S |
messagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter)
Configure
messagePropertiesConverter on both the
RabbitTemplate (for sends) and
SimpleMessageListenerContainer
(for receives). |
S |
outboundHeaderMapper(AmqpHeaderMapper mapper)
Configure the outbound header mapper to use when
extractPayload(boolean)
is true. |
S |
queueName(String queueName)
Also implicitly sets the
id(String) (if not explicitly set). |
S |
templateChannelTransacted(boolean channelTransacted)
Configure
channelTransacted on the
RabbitTemplate used when sending
messages to the channel. |
datatype, getComponentsToRegister, interceptor, messageConverter, wireTap, wireTap, wireTap
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected final AmqpChannelFactoryBean amqpChannelFactoryBean
protected AmqpPollableMessageChannelSpec(ConnectionFactory connectionFactory)
protected S id(@Nullable String id)
IntegrationComponentSpec
beanName
to register the
bean in the application context for this component.id
in class IntegrationComponentSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>
id
- the id.public S queueName(String queueName)
id(String)
(if not explicitly set).queueName
- the queueName.AmqpChannelFactoryBean.setQueueName(String)
public S encoding(String encoding)
encoding
- the encoding.RabbitTemplate.setEncoding(String)
public S amqpMessageConverter(MessageConverter messageConverter)
messageConverter
- the messageConverter.RabbitTemplate.setMessageConverter(MessageConverter)
public S channelTransacted(boolean channelTransacted)
channelTransacted
on both the
RabbitTemplate
(for sends) and
SimpleMessageListenerContainer
(for receives) when using Spring Integration 4.0. When using Spring Integration
4.1, only the container is configured. See templateChannelTransacted(boolean)
.channelTransacted
- the channelTransacted.RabbitAccessor.setChannelTransacted(boolean)
,
RabbitAccessor.setChannelTransacted(boolean)
public S templateChannelTransacted(boolean channelTransacted)
channelTransacted
on the
RabbitTemplate
used when sending
messages to the channel. Only applies when Spring Integration 4.1 or greater is
being used. Otherwise, see channelTransacted(boolean)
.channelTransacted
- the channelTransacted.RabbitAccessor.setChannelTransacted(boolean)
public S messagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter)
messagePropertiesConverter
on both the
RabbitTemplate
(for sends) and
SimpleMessageListenerContainer
(for receives).messagePropertiesConverter
- the messagePropertiesConverter.RabbitTemplate.setMessagePropertiesConverter(org.springframework.amqp.rabbit.support.MessagePropertiesConverter)
,
AbstractMessageListenerContainer.setMessagePropertiesConverter(org.springframework.amqp.rabbit.support.MessagePropertiesConverter)
public S defaultDeliveryMode(MessageDeliveryMode mode)
AmqpHeaders.DELIVERY_MODE
header.
Default is MessageDeliveryMode.PERSISTENT
.mode
- the mode.public S extractPayload(boolean extract)
extract
- true to enable mapping.outboundHeaderMapper(AmqpHeaderMapper)
,
inboundHeaderMapper(AmqpHeaderMapper)
public S outboundHeaderMapper(AmqpHeaderMapper mapper)
extractPayload(boolean)
is true. Defaults to a DefaultAmqpHeaderMapper
.mapper
- the mapper.extractPayload(boolean)
public S inboundHeaderMapper(AmqpHeaderMapper mapper)
extractPayload(boolean)
is true. Defaults to a DefaultAmqpHeaderMapper
.mapper
- the mapper.extractPayload(boolean)
public S headersMappedLast(boolean headersLast)
headersLast
- true to map headers last.AbstractAmqpChannel.setHeadersMappedLast(boolean)
protected T doGet()
doGet
in class MessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>