Class Amqp
java.lang.Object
org.springframework.integration.amqp.dsl.Amqp
Factory class for AMQP components.
- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell, Artem Vozhdayenko
-
Method Summary
Modifier and TypeMethodDescriptionstatic AmqpAsyncOutboundGatewaySpec
asyncOutboundGateway
(AsyncRabbitTemplate asyncRabbitTemplate) Create an initial AmqpAsyncOutboundGatewaySpec.static AmqpMessageChannelSpec<?,
?> channel
(String id, ConnectionFactory connectionFactory) Create an initial AmqpMessageChannelSpec.static AmqpMessageChannelSpec<?,
?> channel
(ConnectionFactory connectionFactory) Create an initial AmqpMessageChannelSpec.inboundAdapter
(ConnectionFactory connectionFactory, String... queueNames) Create an initial AmqpInboundChannelAdapterSpec using aSimpleMessageListenerContainer
.inboundAdapter
(ConnectionFactory connectionFactory, Queue... queues) Create an initial AmqpInboundChannelAdapterSpec using aSimpleMessageListenerContainer
.inboundAdapter
(DirectMessageListenerContainer listenerContainer) Create an initialAmqpInboundGatewayDMLCSpec
with providedDirectMessageListenerContainer
.inboundAdapter
(SimpleMessageListenerContainer listenerContainer) Create an initialAmqpInboundGatewaySMLCSpec
with providedSimpleMessageListenerContainer
.static AmqpInboundGatewaySMLCSpec
inboundGateway
(ConnectionFactory connectionFactory, String... queueNames) Create an initialAmqpInboundGatewaySpec
.static AmqpInboundGatewaySMLCSpec
inboundGateway
(ConnectionFactory connectionFactory, AmqpTemplate amqpTemplate, String... queueNames) Create an initialAmqpInboundGatewaySpec
.static AmqpInboundGatewaySMLCSpec
inboundGateway
(ConnectionFactory connectionFactory, AmqpTemplate amqpTemplate, Queue... queues) Create an initialAmqpInboundGatewaySpec
.static AmqpInboundGatewaySMLCSpec
inboundGateway
(ConnectionFactory connectionFactory, Queue... queues) Create an initialAmqpInboundGatewaySpec
.static AmqpInboundGatewayDMLCSpec
inboundGateway
(DirectMessageListenerContainer listenerContainer) Create an initialDirectMessageListenerContainerSpec
with providedDirectMessageListenerContainer
.static AmqpInboundGatewayDMLCSpec
inboundGateway
(DirectMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) Create an initialAmqpInboundGatewayDMLCSpec
with providedDirectMessageListenerContainer
.static AmqpInboundGatewaySMLCSpec
inboundGateway
(SimpleMessageListenerContainer listenerContainer) Create an initialAmqpInboundGatewaySMLCSpec
with providedSimpleMessageListenerContainer
.static AmqpInboundGatewaySMLCSpec
inboundGateway
(SimpleMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) Create an initialAmqpInboundGatewaySMLCSpec
with providedSimpleMessageListenerContainer
.inboundPolledAdapter
(ConnectionFactory connectionFactory, String queue) Create an initial AmqpInboundPolledChannelAdapterSpec.inboundPolledAdapter
(ConnectionFactory connectionFactory, AmqpMessageSource.AmqpAckCallbackFactory ackCallbackFactory, String queue) Create an initial AmqpInboundPolledChannelAdapterSpec.outboundAdapter
(AmqpTemplate amqpTemplate) Create an initial AmqpOutboundEndpointSpec (adapter).static AmqpOutboundGatewaySpec
outboundGateway
(AmqpTemplate amqpTemplate) Create an initial AmqpOutboundEndpointSpec (gateway).pollableChannel
(String id, ConnectionFactory connectionFactory) Create an initial AmqpPollableMessageChannelSpec.pollableChannel
(ConnectionFactory connectionFactory) Create an initial AmqpPollableMessageChannelSpec.publishSubscribeChannel
(String id, ConnectionFactory connectionFactory) Create an initial AmqpPublishSubscribeMessageChannelSpec.publishSubscribeChannel
(ConnectionFactory connectionFactory) Create an initial AmqpPublishSubscribeMessageChannelSpec.
-
Method Details
-
inboundGateway
public static AmqpInboundGatewaySMLCSpec inboundGateway(ConnectionFactory connectionFactory, String... queueNames) Create an initialAmqpInboundGatewaySpec
.- Parameters:
connectionFactory
- the connectionFactory.queueNames
- the queueNames.- Returns:
- the AmqpInboundGatewaySpec.
-
inboundGateway
public static AmqpInboundGatewaySMLCSpec inboundGateway(ConnectionFactory connectionFactory, AmqpTemplate amqpTemplate, String... queueNames) Create an initialAmqpInboundGatewaySpec
.- Parameters:
connectionFactory
- the connectionFactory.amqpTemplate
- theAmqpTemplate
to use.queueNames
- the queueNames.- Returns:
- the AmqpInboundGatewaySpec.
-
inboundGateway
public static AmqpInboundGatewaySMLCSpec inboundGateway(ConnectionFactory connectionFactory, Queue... queues) Create an initialAmqpInboundGatewaySpec
.- Parameters:
connectionFactory
- the connectionFactory.queues
- the queues.- Returns:
- the AmqpInboundGatewaySpec.
-
inboundGateway
public static AmqpInboundGatewaySMLCSpec inboundGateway(ConnectionFactory connectionFactory, AmqpTemplate amqpTemplate, Queue... queues) Create an initialAmqpInboundGatewaySpec
.- Parameters:
connectionFactory
- the connectionFactory.amqpTemplate
- theAmqpTemplate
to use.queues
- the queues.- Returns:
- the AmqpInboundGatewaySpec.
-
inboundGateway
public static AmqpInboundGatewaySMLCSpec inboundGateway(SimpleMessageListenerContainer listenerContainer) Create an initialAmqpInboundGatewaySMLCSpec
with providedSimpleMessageListenerContainer
. Note: only endpoint options are available from spec. ThelistenerContainer
options should be specified on the providedSimpleMessageListenerContainer
usingAmqpInboundGatewaySMLCSpec.configureContainer(java.util.function.Consumer)
.- Parameters:
listenerContainer
- the listenerContainer- Returns:
- the AmqpInboundGatewaySMLCSpec.
-
inboundGateway
public static AmqpInboundGatewaySMLCSpec inboundGateway(SimpleMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) Create an initialAmqpInboundGatewaySMLCSpec
with providedSimpleMessageListenerContainer
. Note: only endpoint options are available from spec. ThelistenerContainer
options should be specified on the providedSimpleMessageListenerContainer
usingAmqpInboundGatewaySMLCSpec.configureContainer(java.util.function.Consumer)
.- Parameters:
listenerContainer
- the listenerContaineramqpTemplate
- theAmqpTemplate
to use.- Returns:
- the AmqpInboundGatewaySMLCSpec.
-
inboundGateway
public static AmqpInboundGatewayDMLCSpec inboundGateway(DirectMessageListenerContainer listenerContainer) Create an initialDirectMessageListenerContainerSpec
with providedDirectMessageListenerContainer
. Note: only endpoint options are available from spec. ThelistenerContainer
options should be specified on the providedDirectMessageListenerContainer
usingAmqpInboundGatewayDMLCSpec.configureContainer(java.util.function.Consumer)
.- Parameters:
listenerContainer
- the listenerContainer- Returns:
- the AmqpInboundGatewayDMLCSpec.
-
inboundGateway
public static AmqpInboundGatewayDMLCSpec inboundGateway(DirectMessageListenerContainer listenerContainer, AmqpTemplate amqpTemplate) Create an initialAmqpInboundGatewayDMLCSpec
with providedDirectMessageListenerContainer
. Note: only endpoint options are available from spec. ThelistenerContainer
options should be specified on the providedDirectMessageListenerContainer
usingAmqpInboundGatewayDMLCSpec.configureContainer(java.util.function.Consumer)
.- Parameters:
listenerContainer
- the listenerContaineramqpTemplate
- theAmqpTemplate
to use.- Returns:
- the AmqpInboundGatewayDMLCSpec.
-
inboundPolledAdapter
public static AmqpInboundPolledChannelAdapterSpec inboundPolledAdapter(ConnectionFactory connectionFactory, String queue) Create an initial AmqpInboundPolledChannelAdapterSpec.- Parameters:
connectionFactory
- the connectionFactory.queue
- the queue.- Returns:
- the AmqpInboundPolledChannelAdapterSpec.
- Since:
- 5.0.1
-
inboundPolledAdapter
public static AmqpInboundPolledChannelAdapterSpec inboundPolledAdapter(ConnectionFactory connectionFactory, AmqpMessageSource.AmqpAckCallbackFactory ackCallbackFactory, String queue) Create an initial AmqpInboundPolledChannelAdapterSpec.- Parameters:
connectionFactory
- the connectionFactory.ackCallbackFactory
- the ackCallbackFactoryqueue
- the queue.- Returns:
- the AmqpInboundPolledChannelAdapterSpec.
- Since:
- 5.0.1
-
inboundAdapter
public static AmqpInboundChannelAdapterSMLCSpec inboundAdapter(ConnectionFactory connectionFactory, String... queueNames) Create an initial AmqpInboundChannelAdapterSpec using aSimpleMessageListenerContainer
.- Parameters:
connectionFactory
- the connectionFactory.queueNames
- the queueNames.- Returns:
- the AmqpInboundChannelAdapterSpec.
-
inboundAdapter
public static AmqpInboundChannelAdapterSMLCSpec inboundAdapter(ConnectionFactory connectionFactory, Queue... queues) Create an initial AmqpInboundChannelAdapterSpec using aSimpleMessageListenerContainer
.- Parameters:
connectionFactory
- the connectionFactory.queues
- the queues.- Returns:
- the AmqpInboundChannelAdapterSpec.
-
inboundAdapter
public static AmqpInboundChannelAdapterSMLCSpec inboundAdapter(SimpleMessageListenerContainer listenerContainer) Create an initialAmqpInboundGatewaySMLCSpec
with providedSimpleMessageListenerContainer
. Note: only endpoint options are available from spec. ThelistenerContainer
options should be specified on the providedSimpleMessageListenerContainer
usingAmqpInboundGatewaySMLCSpec.configureContainer(java.util.function.Consumer)
.- Parameters:
listenerContainer
- the listenerContainer- Returns:
- the AmqpInboundGatewaySMLCSpec.
-
inboundAdapter
public static AmqpInboundChannelAdapterDMLCSpec inboundAdapter(DirectMessageListenerContainer listenerContainer) Create an initialAmqpInboundGatewayDMLCSpec
with providedDirectMessageListenerContainer
. Note: only endpoint options are available from spec. ThelistenerContainer
options should be specified on the providedDirectMessageListenerContainer
usingAmqpInboundGatewaySMLCSpec.configureContainer(java.util.function.Consumer)
.- Parameters:
listenerContainer
- the listenerContainer- Returns:
- the AmqpInboundGatewaySMLCSpec.
-
outboundAdapter
Create an initial AmqpOutboundEndpointSpec (adapter).- Parameters:
amqpTemplate
- the amqpTemplate.- Returns:
- the AmqpOutboundEndpointSpec.
-
outboundGateway
Create an initial AmqpOutboundEndpointSpec (gateway).- Parameters:
amqpTemplate
- the amqpTemplate.- Returns:
- the AmqpOutboundEndpointSpec.
-
asyncOutboundGateway
public static AmqpAsyncOutboundGatewaySpec asyncOutboundGateway(AsyncRabbitTemplate asyncRabbitTemplate) Create an initial AmqpAsyncOutboundGatewaySpec.- Parameters:
asyncRabbitTemplate
- theAsyncRabbitTemplate
.- Returns:
- the AmqpOutboundEndpointSpec.
-
pollableChannel
public static AmqpPollableMessageChannelSpec<?,PollableAmqpChannel> pollableChannel(ConnectionFactory connectionFactory) Create an initial AmqpPollableMessageChannelSpec.- Parameters:
connectionFactory
- the connectionFactory.- Returns:
- the AmqpPollableMessageChannelSpec.
-
pollableChannel
public static AmqpPollableMessageChannelSpec<?,PollableAmqpChannel> pollableChannel(@Nullable String id, ConnectionFactory connectionFactory) Create an initial AmqpPollableMessageChannelSpec.- Parameters:
id
- the id.connectionFactory
- the connectionFactory.- Returns:
- the AmqpPollableMessageChannelSpec.
-
channel
Create an initial AmqpMessageChannelSpec.- Parameters:
connectionFactory
- the connectionFactory.- Returns:
- the AmqpMessageChannelSpec.
-
channel
public static AmqpMessageChannelSpec<?,?> channel(@Nullable String id, ConnectionFactory connectionFactory) Create an initial AmqpMessageChannelSpec.- Parameters:
id
- the id.connectionFactory
- the connectionFactory.- Returns:
- the AmqpMessageChannelSpec.
-
publishSubscribeChannel
public static AmqpPublishSubscribeMessageChannelSpec publishSubscribeChannel(ConnectionFactory connectionFactory) Create an initial AmqpPublishSubscribeMessageChannelSpec.- Parameters:
connectionFactory
- the connectionFactory.- Returns:
- the AmqpPublishSubscribeMessageChannelSpec.
-
publishSubscribeChannel
public static AmqpPublishSubscribeMessageChannelSpec publishSubscribeChannel(@Nullable String id, ConnectionFactory connectionFactory) Create an initial AmqpPublishSubscribeMessageChannelSpec.- Parameters:
id
- the id.connectionFactory
- the connectionFactory.- Returns:
- the AmqpPublishSubscribeMessageChannelSpec.
-