Describe the bug
Consume on high throughput sturggles to keep up and eventually leads to memory usage rising until crashing
Reproduce
Run a consumer that subscribes to that topic and logs each topic offset
Run a producer that continuously produces messages to a topic at 5MB/s (split between 70-100 messages per second)
After a certain amount of time (for me around 10/15 minutes) memory usage starts rising rapidly and the subscription's backlog size also rises steadily.
Expected behavior
I expect the consumer to be able to handle these kinds of throughput and keep up with the consumer with memory usage staying steady.
Observed behavior
Every time the dequeue function is called, I logged the length of receiveQueue. At some point, it barely manages to empty the queue, reaching thousands of messages rapidly (even though I set receiveQueueSize to 1000).
This can be seen even within seconds if the consumer starts with a few thousand messages in its backlog.
Describe the bug Consume on high throughput sturggles to keep up and eventually leads to memory usage rising until crashing
Reproduce
Observed behavior Every time the dequeue function is called, I logged the length of receiveQueue. At some point, it barely manages to empty the queue, reaching thousands of messages rapidly (even though I set receiveQueueSize to 1000). This can be seen even within seconds if the consumer starts with a few thousand messages in its backlog.
Environment: