From 8bd9464b74fd7443ae4954da7b85171074032a19 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Wed, 22 Jan 2020 15:47:00 -0500 Subject: [PATCH] Use Overflow.BUFFER for PollableChPublisherAdapter The `ReactiveStreamsConsumerTests.testReactiveStreamsConsumerPollableChannel()` fails periodically. Change the logic to rely on the `FluxSink.OverflowStrategy.BUFFER` for possible future subscribers, meanwhile with `IGNORE` we just lose a message altogether --- .../integration/channel/MessageChannelReactiveUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java index 534855bb8d..65231cbc7e 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/channel/MessageChannelReactiveUtils.java @@ -93,8 +93,7 @@ public final class MessageChannelReactiveUtils { && (m = this.channel.receive()) != null) { // NOSONAR sink.next((Message) m); } - }), - FluxSink.OverflowStrategy.IGNORE) + })) .subscribeOn(Schedulers.elastic()) .subscribe(subscriber); }