Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Throttle / limit rate of messages on MQTT topic on client

Sorry, just realised I misunderstood the issue, I thought you mean when you reconnect and the server sends messages to you. I'm not sure how best to manage the situation of offline messages being buffered then resent, short of limiting the size of the queue buffer. You can use SetMessageChannelDepth() on ClientOptions to do this, the default is 100, once the channel is full calls to Publish while offline will block.

Al

On Wed, 3 Apr 2019 at 07:08, John Kjellberg <kjellberg.john@xxxxxxxxx> wrote:
Hi.

This is mainly a question for the golang client.

AWS IoT have a limit on number of unacknowledged messages per thing(all things have a unique topic) and some other limits(100 request/s/client). So I would need to throttle numer of messages. This is quite easy to do when making a Publish, but when reconnecting and the client automatically resends messages I will have no control over this.

Is there some functionality in the client where I control this?

Perhaps I should try to implement it myself in the paho.mqtt.golang library. If so, are there other clients that implements this that I could draw inspiration from?

Regards,

/ John
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/paho-dev

Back to the top