Detect unsent DISCONNECT messages
This change uses a ChannelInterceptor (inserted at index 0) to detect when a DISCONNECT message is precluded from being sent on the clientInboundChannel. This can happen if another interceptor allows a runtime exception out from preSend or returns false. It is crucial for such messages to be processed, so when detected they're processed still. Issue: SPR-12218
This commit is contained in:
@@ -130,7 +130,7 @@ public class MessageBrokerConfigurationTests {
|
||||
AbstractSubscribableChannel channel = this.customContext.getBean(
|
||||
"clientInboundChannel", AbstractSubscribableChannel.class);
|
||||
|
||||
assertEquals(1, channel.getInterceptors().size());
|
||||
assertEquals(2, channel.getInterceptors().size());
|
||||
|
||||
ThreadPoolTaskExecutor taskExecutor = this.customContext.getBean(
|
||||
"clientInboundChannelExecutor", ThreadPoolTaskExecutor.class);
|
||||
|
||||
Reference in New Issue
Block a user