B4J Question jMQTT set message queue size

Coldrestart

Member
Licensed User
Longtime User
Hello everyone,

I have a question about the jMQTT library.
Is it possible to configure the option "max_queued_messages_set(self, queue_size)" ?

My system runs on a PC, where sometimes the internet connection is lost for a long time.
I like that the messages are buffered, but when a long internet interruption occurs, I want to prevent consuming all ram memory.

My second question / wish, is it possible to support MQTT v5?

Thanks in advance,
Coldrestart.
 

teddybear

Well-Known Member
Licensed User
Why do you want to config the max_queued? when the internet is disconnected, the event mqtt_disconnected is raised and you can not publish messages. if you would like to buffer the messages, you can save them into a file and resend them after the internet is connected
 
Upvote 0

Coldrestart

Member
Licensed User
Longtime User
Ok, I thought that the MQTT client lib would do the buffering task.

Thanks for helping out, I will make a test setup to understand it better.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…