From 1ac17e40e4a60dd135466f1b34d07037699db703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20Cogolu=C3=A8gnes?= <514737+acogoluegnes@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:32:10 +0200 Subject: [PATCH] Do not wait before trying to dispatch a chunk of messages A stream connection waited artificially before retrying to send a chunk after Osiris returned an end_of_stream result. It was initially to let some messages arrive in the stream. This wait time does not seem necessary and can be even counter productive. A connection with many consumers on the same stream that gets published to can get many notifications from Osiris and ended up waiting for each consumers. This can make the connection blocks for several seconds and unable to perform other operations like simple RPC. This commit removes the wait time. References rabbitmq/rabbitmq-stream-java-client#863 (cherry picked from commit 193b04d315f3ffaf659a35ed5252063347808b61) --- deps/rabbitmq_stream/src/rabbit_stream_reader.erl | 1 - 1 file changed, 1 deletion(-) diff --git a/deps/rabbitmq_stream/src/rabbit_stream_reader.erl b/deps/rabbitmq_stream/src/rabbit_stream_reader.erl index 1f9627a556cf..5f0676b31cb1 100644 --- a/deps/rabbitmq_stream/src/rabbit_stream_reader.erl +++ b/deps/rabbitmq_stream/src/rabbit_stream_reader.erl @@ -3706,7 +3706,6 @@ send_chunks(DeliverVersion, setopts(Transport, Socket, [{nopush, false}]), case Retry of true -> - timer:sleep(1), send_chunks(DeliverVersion, Transport, Consumer,