Class AmqpClientInboundGatewaySpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<AmqpClientInboundGatewaySpec, AmqpClientInboundGateway>
org.springframework.integration.dsl.MessagingGatewaySpec<AmqpClientInboundGatewaySpec, AmqpClientInboundGateway>
org.springframework.integration.amqp.dsl.AmqpClientInboundGatewaySpec
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<AmqpClientInboundGateway>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle
public class AmqpClientInboundGatewaySpec
extends MessagingGatewaySpec<AmqpClientInboundGatewaySpec, AmqpClientInboundGateway>
Spec for an 
AmqpClientInboundGateway.- Since:
- 7.0
- Author:
- Artem Bilan
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsConstructorDescriptionAmqpClientInboundGatewaySpec(org.springframework.amqp.rabbitmq.client.AmqpConnectionFactory connectionFactory, String... queueNames) Create an instance based on aAmqpConnectionFactoryand queues to consume from.
- 
Method SummaryModifier and TypeMethodDescriptionadviceChain(Advice... advices) SetAdviceinstances to proxy message listener.afterReceivePostProcessors(MessagePostProcessor... afterReceivePostProcessors) AddMessagePostProcessorinstances to apply on just received messages.autoSettle(boolean autoSettle) Set tofalseto propagate an acknowledgement callback into message headers for downstream flow manual settlement.consumersPerQueue(int consumersPerQueue) Each queue runs in its own consumer; set this property to create multiple consumers for each queue.defaultRequeue(boolean defaultRequeue) Set the default behavior when a message processing has failed.gracefulShutdownPeriod(Duration gracefulShutdownPeriod) Set a duration for how long to wait for all the consumers to shut down successfully on listener container stop.headerMapper(AmqpHeaderMapper headerMapper) Set anAmqpHeaderMapperto map request and reply headers.initialCredits(int initialCredits) The initial number credits to grant to the AMQP receiver.messageConverter(@Nullable MessageConverter messageConverter) Set aMessageConverterto replace the defaultSimpleMessageConverter.priority(int priority) The consumer priority.replyExchange(String exchange) Set an exchange for publishing reply.replyPostProcessor(ReplyPostProcessor replyPostProcessor) Set anReplyPostProcessorto modify reply AMQP message before producing.replyQueue(String queue) Set a queue for publishing reply.replyRoutingKey(String routingKey) Set a routing key for publishing reply.stateListeners(com.rabbitmq.client.amqp.Resource.StateListener... stateListeners) AddResource.StateListenerinstances to the consumer.Methods inherited from class org.springframework.integration.dsl.MessagingGatewaySpecautoStartup, errorChannel, errorChannel, errorOnTimeout, id, observationConvention, phase, replyChannel, replyChannel, replyMapper, replyTimeout, requestChannel, requestChannel, requestMapper, requestTimeout, shouldTrackMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingletonMethods inherited from interface org.springframework.context.SmartLifecycleisPauseable
- 
Constructor Details- 
AmqpClientInboundGatewaySpecpublic AmqpClientInboundGatewaySpec(org.springframework.amqp.rabbitmq.client.AmqpConnectionFactory connectionFactory, String... queueNames) Create an instance based on aAmqpConnectionFactoryand queues to consume from.- Parameters:
- connectionFactory- the- AmqpConnectionFactoryto connect
- queueNames- queues to consume from
 
 
- 
- 
Method Details- 
initialCreditsThe initial number credits to grant to the AMQP receiver. The default is100.- Parameters:
- initialCredits- number of initial credits
- Returns:
- the spec
 
- 
priorityThe consumer priority.- Parameters:
- priority- consumer priority
- Returns:
- the spec
 
- 
stateListenerspublic AmqpClientInboundGatewaySpec stateListeners(com.rabbitmq.client.amqp.Resource.StateListener... stateListeners) AddResource.StateListenerinstances to the consumer.- Parameters:
- stateListeners- listeners to add
- Returns:
- the spec
 
- 
afterReceivePostProcessorspublic AmqpClientInboundGatewaySpec afterReceivePostProcessors(MessagePostProcessor... afterReceivePostProcessors) AddMessagePostProcessorinstances to apply on just received messages.- Parameters:
- afterReceivePostProcessors- listeners to add
- Returns:
- the spec
 
- 
adviceChainSetAdviceinstances to proxy message listener.- Parameters:
- advices- the advices to add
- Returns:
- the spec
 
- 
autoSettleSet tofalseto propagate an acknowledgement callback into message headers for downstream flow manual settlement.- Parameters:
- autoSettle-- trueto acknowledge messages automatically.
- Returns:
- the spec
 
- 
defaultRequeueSet the default behavior when a message processing has failed. When true, messages will be requeued, when false, they will be discarded. This option can be overruled by throwingAmqpRejectAndDontRequeueExceptionorImmediateRequeueAmqpExceptionfrom the downstream flow. Default true.- Parameters:
- defaultRequeue- true to requeue by default.
- Returns:
- the spec
 
- 
gracefulShutdownPeriodSet a duration for how long to wait for all the consumers to shut down successfully on listener container stop. Default 30 seconds.- Parameters:
- gracefulShutdownPeriod- the timeout to wait on stop.
- Returns:
- the spec
 
- 
consumersPerQueueEach queue runs in its own consumer; set this property to create multiple consumers for each queue. Can be treated asconcurrency, but per queue.- Parameters:
- consumersPerQueue- the consumers per queue.
- Returns:
- the spec
 
- 
messageConverterSet aMessageConverterto replace the defaultSimpleMessageConverter. If set to null, an AMQP message is sent as is into a message payload. And a reply message has to return an AMQP message as its payload.- Parameters:
- messageConverter- the- MessageConverterto use or null.
- Returns:
- the spec
 
- 
headerMapperSet anAmqpHeaderMapperto map request and reply headers.- Parameters:
- headerMapper- the- AmqpHeaderMapperto use.
- Returns:
- the spec
 
- 
replyPostProcessorSet anReplyPostProcessorto modify reply AMQP message before producing.- Parameters:
- replyPostProcessor- the- ReplyPostProcessorto use.
- Returns:
- the spec
 
- 
replyExchangeSet an exchange for publishing reply. Mutually exclusive withreplyQueue(String). If neither is set, thereplyToproperty from the request message is used to determine where to produce a reply.- Parameters:
- exchange- the exchange to send a reply.
- Returns:
- the spec
 
- 
replyRoutingKeySet a routing key for publishing reply. Used only together withreplyExchange(String). If neither is set, thereplyToproperty from the request message is used to determine where to produce a reply.- Parameters:
- routingKey- the routing key to send a reply.
- Returns:
- the spec
 
- 
replyQueueSet a queue for publishing reply. Mutually exclusive withreplyExchange(String). If neither is set, thereplyToproperty from the request message is used to determine where to produce a reply.- Parameters:
- queue- the queue to send a reply.
- Returns:
- the spec
 
 
-