Skip to content

Do not wait before trying to dispatch a chunk of messages#14766

Merged
kjnilsson merged 1 commit intomainfrom
stream-do-not-wait-before-dispatch-retry
Nov 18, 2025
Merged

Do not wait before trying to dispatch a chunk of messages#14766
kjnilsson merged 1 commit intomainfrom
stream-do-not-wait-before-dispatch-retry

Conversation

@acogoluegnes
Copy link
Copy Markdown
Contributor

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

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
@acogoluegnes acogoluegnes added this to the 4.3.0 milestone Oct 21, 2025
@kjnilsson kjnilsson self-requested a review November 18, 2025 09:09
@kjnilsson kjnilsson marked this pull request as ready for review November 18, 2025 09:22
@kjnilsson kjnilsson changed the title DO NOT MERGE YET Do not wait before trying to dispatch a chunk of messages Do not wait before trying to dispatch a chunk of messages Nov 18, 2025
@kjnilsson kjnilsson merged commit 8553314 into main Nov 18, 2025
574 of 575 checks passed
@kjnilsson kjnilsson deleted the stream-do-not-wait-before-dispatch-retry branch November 18, 2025 09:23
acogoluegnes added a commit that referenced this pull request Nov 18, 2025
Do not wait before trying to dispatch a chunk of messages (backport #14766)
acogoluegnes added a commit to rabbitmq/rabbitmq-stream-java-client that referenced this pull request Nov 27, 2025
Messages tend to arrive faster after a change in the broker, so we
increase the publishing rate in the test to make sure an inactive
consumer gets some negative credit notifications.

References rabbitmq/rabbitmq-server#14766
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants