Class BoundRabbitChannelAdvice
java.lang.Object
org.springframework.integration.amqp.support.BoundRabbitChannelAdvice
- All Implemented Interfaces:
Advice
,Interceptor
,MethodInterceptor
,HandleMessageAdvice
An advice that causes all downstream
RabbitOperations
operations to be executed
on the same channel, as long as there are no thread handoffs, since the channel is
bound to the thread. The same RabbitOperations must be used in this and all downstream
components. Typically, used with a splitter or some other mechanism that would cause
multiple messages to be sent. Optionally waits for publisher confirms if the channel is
so configured.- Since:
- 5.1
- Author:
- Gary Russell, Artem Bilan
-
Constructor Summary
ConstructorDescriptionBoundRabbitChannelAdvice
(RabbitOperations operations) Construct an instance that doesn't wait for confirms.BoundRabbitChannelAdvice
(RabbitOperations operations, Duration waitForConfirmsTimeout) Construct an instance that waits for publisher confirms (if configured and waitForConfirmsTimeout is not null). -
Method Summary
-
Constructor Details
-
BoundRabbitChannelAdvice
Construct an instance that doesn't wait for confirms.- Parameters:
operations
- the operations.
-
BoundRabbitChannelAdvice
public BoundRabbitChannelAdvice(RabbitOperations operations, @Nullable Duration waitForConfirmsTimeout) Construct an instance that waits for publisher confirms (if configured and waitForConfirmsTimeout is not null).- Parameters:
operations
- the operations.waitForConfirmsTimeout
- the timeout.
-
-
Method Details
-
invoke
- Specified by:
invoke
in interfaceMethodInterceptor
- Throws:
Throwable
-