[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] [Paho MQTT Golang] Device only send 120 messages in store (QoS 2)

Hi Allan,
Yes, the problem will happened again with more than 250 messages. I must change the max_queued_messages value to send more than 250 messages.
I am waiting for 1.2.0 version.
Thanks

Aditya Alviori

Pada tanggal Jum, 2 Nov 2018 pukul 17.58 Allan Stockdill-Mander <asm@xxxxxxxxxx> menulis:
There does appear that there might be an issue in the client with sending timely acks for incoming QoS1/2 messages, your change appears to mask the issue, I suspect if you send more than 250 messages you'd see the same problem again. I will look into it.
Â
Thanks,
Â
Allan Stockdill-Mander, GCFA
Tech Lead Firewalls and Automation - Alchemy
Â
Â
----- Original message -----
From: aditya alviori <adityaalviori@xxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: paho-dev@xxxxxxxxxxx
Cc:
Subject: Re: [paho-dev] [Paho MQTT Golang] Device only send 120 messages in store (QoS 2)
Date: Mon, Oct 29, 2018 3:18 AM
Â
Hi Allan,
Â
Based on I read on internet about this case, I tried to edited broker configuration in /mosquitto/conf.d/default.conf. I add this line into the configuration
Â
max_inflight_messages 20
max_queued_messages 250Â (default value 100)
Â
then I tried to send 120++ messages in store.
Result: Broker receive 120++ the messages. I checked the store, no remaining messages.
Â
Maybe this method help to solved this problems?
Â
Thanks
Â
Aditya Alviori
Â
Â
Pada tanggal Jum, 26 Okt 2018 pukul 14.11 Allan Stockdill-Mander <asm@xxxxxxxxxx> menulis:
Hi Vio,
Â
In the case that a connection is lost but the program continues to run and autoreconnects the messages that are queued to be sent are stored in the internal buffers of the client, and when the connection is reestablished it is from there that the messages to be sent are taken, not the persistence store. There has been a recent PR merged that supports resuming sending messages from the persistence store then the whole client is stopped and recreated, this may resolve your issue, it's currently in HEAD on the github repo, I plan a 1.2.0 release shortly.
Â
Allan Stockdill-Mander, GCFA
Tech Lead Firewalls and Automation - Alchemy
Â
Â
----- Original message -----
From: aditya alviori <adityaalviori@xxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: paho-dev@xxxxxxxxxxx
Cc:
Subject: [paho-dev] [Paho MQTT Golang] Device only send 120 messages in store (QoS 2)
Date: Thu, Oct 18, 2018 5:22 AM
Â
Dear Paho-Dev Team,
Let me introduce myself, I am Vio, from Indonesia.
I use Paho-MQTT golang to send data every 5 seconds to broker using QoS 2. The broker was installed in server with standard installation (no additional setting, except username and password).
When I lost connection, messages store in "mqttStore folder" which I created in internal memory. When I get connection, only 120 messages show in my subscriber. In folder, I still found the rest of messages.Â
Â
I want to ask about:
1. The rest of messages in store caused by mqtt in device or in the broker?
2. Are there additional setting in client to start MQTT in device?
my setting:
opts = mqtt.NewClientOptions()
opts.AddBroker("tcp://" + IPADDRESS + ":" + PORT).SetClientID("PT.IP_test/" + LOCOID)
opts.SetMaxReconnectInterval(30 * time.Second).SetAutoReconnect(true).SetMessageChannelDepth(150)
opts.SetUsername(MQTTUSERNAME).SetPassword(MQTTPASSWORD)
opts.SetCleanSession(false).SetStore(mqtt.NewFileStore("/home/locotrack/locotrack/storeMQTT"))
Â
Thanks for your help
Â
Best Regards,
Â
Â
Aditya Alviori
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
Â
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

_______________________________________________
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
_______________________________________________
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
Â
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

_______________________________________________
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