Window-Based Flow Control
19.1.1. Window-Based Flow Control By default, HornetQ consumers buffer messages from the server in a client side buffer before the client consumes them. This improves performance: otherwise every time the client consumes a message, HornetQ would have to go the server to request the next message. In turn, this message would then get sent to the client side, if one was available. A network round trip would be involved for every message and considerably reduce performance. To prevent this, HornetQ pre-fetches messages into a buffer on each consumer. The total maximum size of messages (in bytes) that will be buffered on each consumer is determined by the consumer-window-size parameter. By default, the consumer-window-size is set to 1 MiB (1024 * 1024 bytes).