I might be missing something, or maybe I misunderstood the original
question, but it depends on a client, which implementes the protocol, isn't
it?
I believe, the protocol itself supports only sending a number of messages
in a chunk (which can be fixed or vary from chunk to chunk). Broker accepts
a chunk and does *not* split or merge chunks (but there is concept of
segment on the broker side). How that feature of the protocol is
implemented, depends on an implementation of a client.
For example, in Java client, maximum number of messages accumulated by
a client (producer instance?) can be set with `batchSize` parameter
https://rabbitmq.github.io/rabbitmq-stream-java-client/stable/htmlsingle/#creating-a-producer
And, bytewise, chunk will be no bigger than streams protocol frame size
https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_stream/docs/PROTOCOL.adoc#frame-structure
I believe, there is timeout factor here as well, so maybe that's the
indirect part dependant on ingress.
However, in RbFly (sorry for shameless plug, but this is what I know in
detail :), you can use a publisher implemented either by
PublisherBatchLimit class or PublisherBatchFast class
https://wrobell.dcmod.org/rbfly/publish.html
The former blocks when an application hits its own limit of number of
messages. On flush, it will send a chunk of messages, up to that limit.
The latter publisher allows to send a fixed number of messages to a broker
in a loop.
In both cases, messages might be split into multiple chunks, when their
total length goes beyond the protocol frame size. This is client feature
though.
[...]
Best regards,
Artur
--
https://mortgage.diy-labs.eu/