public class BoundRabbitChannelAdvice extends Object implements HandleMessageAdvice
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.Constructor and Description |
---|
BoundRabbitChannelAdvice(org.springframework.amqp.rabbit.core.RabbitOperations operations)
Construct an instance that doesn't wait for confirms.
|
BoundRabbitChannelAdvice(org.springframework.amqp.rabbit.core.RabbitOperations operations,
java.time.Duration waitForConfirmsTimeout)
Construct an instance that waits for publisher confirms (if
configured and waitForConfirmsTimeout is not null).
|
public BoundRabbitChannelAdvice(org.springframework.amqp.rabbit.core.RabbitOperations operations)
operations
- the operations.public BoundRabbitChannelAdvice(org.springframework.amqp.rabbit.core.RabbitOperations operations, @Nullable java.time.Duration waitForConfirmsTimeout)
operations
- the operations.waitForConfirmsTimeout
- the timeout.public Object invoke(MethodInvocation invocation) throws Throwable
invoke
in interface MethodInterceptor
Throwable