Skip to content

Commit 1ac17e4

Browse files
acogoluegnesmergify[bot]
authored andcommitted
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 193b04d)
1 parent 8f85520 commit 1ac17e4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3706,7 +3706,6 @@ send_chunks(DeliverVersion,
37063706
setopts(Transport, Socket, [{nopush, false}]),
37073707
case Retry of
37083708
true ->
3709-
timer:sleep(1),
37103709
send_chunks(DeliverVersion,
37113710
Transport,
37123711
Consumer,

0 commit comments

Comments
 (0)