Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] max_queued_messages ?

Title: max_queued_messages ?

Hi all,

I have some trouble with an infinite message queuing...

I'm using the mosquitto c sourcecode (1.4.10) in my raspberry project (Raspbian Jessy). 
I'm sending a bunch of messages every few seconds via the mosquitto_publish() function (qos 2, retain false). The debug output in my publish-callback always tells me, that the messages were send. So far so good. 
Then I disconnect my client from the network. The messages are still queued via mosquitto_publish(). But it is not stopping (even not after my predefined keepalive of 60 seconds), there is no error or disconnect on the client side. It is just queueing. After a while I have 1000+ messages enqueued and when I replug the cable, all the messages are send.

When I m not sending so many messages, the keepalive works: after ~60 seconds of disconnection, the disconnect callback indicates connection loss.
During initialization, I also used mosquitto_max_inflight_messages_set() to set the inflight message count to 20 (should be default).
I wanted to set the value „max_queued_messages“ (that should be 100 by default), but I have not found any function to do so and not even a hint in the code, where this value is used.

Actually, I'm looking for something that after a predefined amount of messages notices that no client connection exists and that then the disconnect callback is called. Or that I can find out manually, that there is no connection after a bunch of mosquitto_publish()-calls.

Best Regards,

Chris



Back to the top