Skip to content

Commit 095cc22

Browse files
committed
Replace constant from QueueSupplier with local one
1 parent 301e2ea commit 095cc22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor/ReactorNettyTcpClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import reactor.ipc.netty.resources.PoolResources;
4949
import reactor.ipc.netty.tcp.TcpClient;
5050
import reactor.ipc.netty.tcp.TcpResources;
51-
import reactor.util.concurrent.QueueSupplier;
5251

5352
import org.springframework.messaging.Message;
5453
import org.springframework.messaging.tcp.ReconnectStrategy;
@@ -69,6 +68,9 @@
6968
*/
7069
public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
7170

71+
private static final int PUBLISH_ON_BUFFER_SIZE = 16;
72+
73+
7274
private final TcpClient tcpClient;
7375

7476
private final ReactorNettyCodec<P> codec;
@@ -246,7 +248,7 @@ public Publisher<Void> apply(NettyInbound inbound, NettyOutbound outbound) {
246248

247249
inbound.receiveObject()
248250
.cast(Message.class)
249-
.publishOn(scheduler, QueueSupplier.SMALL_BUFFER_SIZE)
251+
.publishOn(scheduler, PUBLISH_ON_BUFFER_SIZE)
250252
.subscribe(
251253
connectionHandler::handleMessage,
252254
connectionHandler::handleFailure,

0 commit comments

Comments
 (0)