...
Why is my queue growing?
Answer
Generally, queues grow when the client is not consuming the Queues may experience growth when clients are unable to consume messages at a rate equal to or greater than they are the messages arriving for their subscriptions. This can be caused by This commonly occurs due to too slow or offline clients (the offline clients that created with persistent sessions). Queues It's important to note that queues can only act serve as temporary buffers if the incoming message stream continuespersists, as the broker has operates within finite resources.
The setting configuration parameter max-queue-size will limit the plays a crucial role in managing individual client queue sizes of individual clients for QoS 1 and QoS 2 messages to a size of 1000
by default. This means once the queue for an individual client reaches this size. By default, it is set to 1000, limiting the size of queues. Once the queue for a specific client reaches this threshold, the broker will drop a message this queued by that client has queued. Whether it will drop . The determination of whether it drops the newest or the oldest message , depends on the setting strategy
. The behavior is described in more detail in our documentation.What this means is that configured strategy
, elaborated in our detailed documentation.
It's essential to understand that merely increasing the queue size in the configuration will not won't prevent messages from getting being dropped indefinitely, since at some point as the disk would be may eventually become full.
The first thing to do in situations when the queue is growing and messages are being dropped is to identify When faced with a growing queue and dropped messages, take the following steps:
Identify Responsible Client Subscriptions:
Determine which client subscriptions are responsible for dropping messages
...
ensuring the subscribed clients are connected
...
.
Ensure Subscribed Clients Are Connected:
Confirm that the consuming clients are actively connected to the broker and are subscribed to their topics.
Verify Clients' Capabilities:
Ensure that the capabilities of the clients are sufficient to handle
...
the inflow of messages
...
.
Consider Load Distribution:
Alternatively, distribute the load on the client side
...
by
...
leveraging shared subscriptions.
By following these steps, you can effectively manage and address the reasons behind your growing queue, promoting a smoother and more efficient system operation. For further guidance, refer to our comprehensive documentation.