Skip to content

Conversation

@acogoluegnes
Copy link
Contributor

@acogoluegnes acogoluegnes commented Jul 4, 2025

This PR integrates 2 optimizations from Osiris for stream consumption:

  • returning stream frame header binary in dispatch chunk callback (stream protocol). This saves a system call by sending the frame header and the chunk header at the same time.
  • reading ahead for small chunks. It is transparent for the stream protocol but required a small tweak in the stream queue type (for AMQP and other non-stream protocols). Read ahead is on by default but can be deactivated with the stream.read_ahead configuration entry (true / false).

Requires to bump Osiris to 1.10.0.

References rabbitmq/osiris#192

@acogoluegnes acogoluegnes added this to the 4.2.0 milestone Jul 4, 2025
@mergify mergify bot added the make label Jul 4, 2025
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch 2 times, most recently from 2ed6136 to 0b9973f Compare July 24, 2025 12:02
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch 3 times, most recently from a4b08fd to c0aef41 Compare August 4, 2025 14:47
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch 3 times, most recently from 4a95db8 to e3d6c66 Compare August 22, 2025 08:17
@kjnilsson kjnilsson force-pushed the stream-dispatching-improvements branch from e3d6c66 to 34b8900 Compare August 26, 2025 10:11
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch 2 times, most recently from 6f7dcc5 to 1cdc9b9 Compare September 4, 2025 08:20
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch 4 times, most recently from bbfdcb0 to fa82be8 Compare September 15, 2025 06:40
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch 5 times, most recently from b68415a to 8c5193d Compare September 22, 2025 07:43
@acogoluegnes acogoluegnes added dependencies Pull requests that update a dependency file streams labels Sep 22, 2025
@acogoluegnes acogoluegnes changed the title Return stream frame header binary in dispatch chunk callback Integrate Osiris reader optimizations for streams Sep 22, 2025
This saves a system call by sending the frame header and the chunk
header at the same time.

References rabbitmq/osiris#192
Osiris can read ahead data in case of small chunks. This saves system
calls and increases consumption rate dramatically for some streams.
This is transparent for the stream protocol, but requires a small tweak
for the stream queue type implementation (passing in the previous
iterator when creating a new one).

The read ahead is on by default but can be deactivated with to the new
stream.read_ahead configuration entry (true / false).

Co-authored-by: Karl Nilsson <[email protected]>

References rabbitmq/osiris#192
@acogoluegnes acogoluegnes force-pushed the stream-dispatching-improvements branch from 8c5193d to 025280e Compare September 22, 2025 09:15
@acogoluegnes acogoluegnes marked this pull request as ready for review September 22, 2025 09:29
@acogoluegnes acogoluegnes merged commit a7827ba into main Sep 22, 2025
830 of 851 checks passed
@acogoluegnes acogoluegnes deleted the stream-dispatching-improvements branch September 22, 2025 12:10
@acogoluegnes acogoluegnes modified the milestones: 4.2.0, 4.3.0 Sep 22, 2025
acogoluegnes added a commit that referenced this pull request Sep 22, 2025
Integrate Osiris reader optimizations for streams (backport #14189)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v4.2.x dependencies Pull requests that update a dependency file make streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants