-
|
Is there any reason why in opensource version client can not pull more than 100 messages per batch ? I have changed max inflight window, messagre query batch size, but whatever i do, telegraf can not pull more than 100 messages per second (exaclty 100, not 99, neither 101) and it is not telegraf limitation, because when using normal persistant session, it can pull plenty times more messages. Is there any fixed limit on durable session for opensource emqx ? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
|
Hello, There are no artificial limitations on the throughput for open-source edition. These symptoms can happen if the client doesn't pipeline PUBACKs. Can you collect a wireshark trace of the telegraf MQTT session? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I'm not sure if i fully understand your findings, but this does not prevent me from supposition you are wrong or at least partially wrong :) Lets focus at point 1 You already see by first and last message ID that emqx is letting telegraf fetch exaclty 98 messages, despite the input is with thousands per second. Telegraf is getting these messages, saving to DB and comes back 1 second later for new ones and then it will again receive exactly 100 messages or very close to 100. Then if we go further and assume that statement regarding 1 secod delay interrupts pipelining in durable session is correct, why telegraf can keep picking up 100 or very close to 100 messages on every session / every second? This doesnt make sense, why the number is so close to 100 and so stable for each batch ? Teegraf supports mqtt v3 |
Beta Was this translation helpful? Give feedback.
-
|
OK, thanks to your response, i have sorted it out by decreasing batch size on output, so that messages are dumped to output i smaller portions and now telegraf can pickup much more. I have one offtop question. Directory /data/messages with durable session is constantly growing and not sure what settings parameter is purposed to clean up messages database. Retention period is rather related to message expiration, but its not described if expired messages are being deleted from disk. There is also max_queue, but it doesnt bring influence on growing storage usage. Can you help me to understand how messages are cleaned ? I thought that qos2 message should be deleted from storage once its received, but its not the case. |
Beta Was this translation helpful? Give feedback.

I'm the one who designed the durable sessions' flow control mechanism, and I know exactly what's going on in your case 🤷
Input volume is not important in this case. When a durable session subscribes to a topic, this topic is marked as durable, and messages sent to it are saved in a builtin DB. The subscriber reads the messages from the DB in batches at its own pace. Producer and consumer are totally insulated from one another:
If the subscriber doesn't consume messages fast enough (e.g. due t…