Skip to main content

[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,

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

Back to the top