Class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,C>
org.springframework.integration.dsl.MessageChannelSpec<S,T>
org.springframework.integration.amqp.dsl.AmqpPollableMessageChannelSpec<S,T>
- Type Parameters:
S
- the targetAmqpPollableMessageChannelSpec
implementation type.
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<T>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
AmqpMessageChannelSpec
public class AmqpPollableMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel> extends MessageChannelSpec<S,T>
A
MessageChannelSpec
for a AbstractAmqpChannel
s.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell, Artem Vozhdayenko
-
Field Summary
Fields Modifier and Type Field Description protected AmqpChannelFactoryBean
amqpChannelFactoryBean
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
AmqpPollableMessageChannelSpec(ConnectionFactory connectionFactory)
-
Method Summary
Modifier and Type Method Description S
amqpMessageConverter(MessageConverter messageConverter)
S
channelTransacted(boolean channelTransacted)
ConfigurechannelTransacted
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives) when using Spring Integration 4.0.S
defaultDeliveryMode(MessageDeliveryMode mode)
Configure the delivery mode for messages that don't have anAmqpHeaders.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 whenextractPayload(boolean)
is true.S
messagePropertiesConverter(MessagePropertiesConverter messagePropertiesConverter)
ConfiguremessagePropertiesConverter
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives).S
outboundHeaderMapper(AmqpHeaderMapper mapper)
Configure the outbound header mapper to use whenextractPayload(boolean)
is true.S
queueName(String queueName)
Also implicitly sets theid(String)
(if not explicitly set).S
templateChannelTransacted(boolean channelTransacted)
ConfigurechannelTransacted
on theRabbitTemplate
used when sending messages to the channel.Methods inherited from class org.springframework.integration.dsl.MessageChannelSpec
datatype, getComponentsToRegister, interceptor, messageConverter, wireTap, wireTap, wireTap
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
Constructor Details
-
Method Details
-
id
Description copied from class:IntegrationComponentSpec
Configure the component identifier. Used as thebeanName
to register the bean in the application context for this component.- Overrides:
id
in classIntegrationComponentSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>
- Parameters:
id
- the id.- Returns:
- the spec.
-
queueName
Also implicitly sets theid(String)
(if not explicitly set).- Parameters:
queueName
- the queueName.- Returns:
- the spec.
- See Also:
AmqpChannelFactoryBean.setQueueName(String)
-
encoding
- Parameters:
encoding
- the encoding.- Returns:
- the spec.
- See Also:
RabbitTemplate.setEncoding(String)
-
amqpMessageConverter
- Parameters:
messageConverter
- the messageConverter.- Returns:
- the spec.
- See Also:
RabbitTemplate.setMessageConverter(MessageConverter)
-
channelTransacted
ConfigurechannelTransacted
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives) when using Spring Integration 4.0. When using Spring Integration 4.1, only the container is configured. SeetemplateChannelTransacted(boolean)
.- Parameters:
channelTransacted
- the channelTransacted.- Returns:
- the spec.
- See Also:
RabbitAccessor.setChannelTransacted(boolean)
,RabbitAccessor.setChannelTransacted(boolean)
-
templateChannelTransacted
ConfigurechannelTransacted
on theRabbitTemplate
used when sending messages to the channel. Only applies when Spring Integration 4.1 or greater is being used. Otherwise, seechannelTransacted(boolean)
.- Parameters:
channelTransacted
- the channelTransacted.- Returns:
- the spec.
- See Also:
RabbitAccessor.setChannelTransacted(boolean)
-
messagePropertiesConverter
ConfiguremessagePropertiesConverter
on both theRabbitTemplate
(for sends) andSimpleMessageListenerContainer
(for receives).- Parameters:
messagePropertiesConverter
- the messagePropertiesConverter.- Returns:
- the spec.
- See Also:
RabbitTemplate.setMessagePropertiesConverter(org.springframework.amqp.rabbit.support.MessagePropertiesConverter)
,AbstractMessageListenerContainer.setMessagePropertiesConverter(org.springframework.amqp.rabbit.support.MessagePropertiesConverter)
-
defaultDeliveryMode
Configure the delivery mode for messages that don't have anAmqpHeaders.DELIVERY_MODE
header. Default isMessageDeliveryMode.PERSISTENT
.- Parameters:
mode
- the mode.- Returns:
- the spec.
-
extractPayload
Configure whether normal spring-messaging to AMQP message mapping is enabled. Default false.- Parameters:
extract
- true to enable mapping.- Returns:
- the spec.
- See Also:
outboundHeaderMapper(AmqpHeaderMapper)
,inboundHeaderMapper(AmqpHeaderMapper)
-
outboundHeaderMapper
Configure the outbound header mapper to use whenextractPayload(boolean)
is true. Defaults to aDefaultAmqpHeaderMapper
.- Parameters:
mapper
- the mapper.- Returns:
- the spec.
- See Also:
extractPayload(boolean)
-
inboundHeaderMapper
Configure the inbound header mapper to use whenextractPayload(boolean)
is true. Defaults to aDefaultAmqpHeaderMapper
.- Parameters:
mapper
- the mapper.- Returns:
- the spec.
- See Also:
extractPayload(boolean)
-
headersMappedLast
- Parameters:
headersLast
- true to map headers last.- Returns:
- the spec.
- See Also:
AbstractAmqpChannel.setHeadersMappedLast(boolean)
-
doGet
- Overrides:
doGet
in classMessageChannelSpec<S extends AmqpPollableMessageChannelSpec<S,T>,T extends AbstractAmqpChannel>
-