MQTT with QoS = 1 and reading the PUBACK

Hello,

With the new firmware of the Flexy 205 (14.0s0), is it possible to read the PUBACK (Publish Acknowledge) of an MQTT publication configured in QoS = 1.

This information is visible in the “Realtime Logs”, but I can not access it from a BASIC program.

I really need this information to make sure I do not lose exchange and be able to do local backups.

Thank you
Christian

Hi Christian,

I haven’t seen anything new in the release notes about this but I’ll check with my colleagues in Belgium to see if this is possible now.

Thanks,
-Tim

Hi Christian,

My colleague was saying that you shouldn’t need to read the puback and should let the MQTT process handle it. But he was saying that. He said if the puback isn’t received then it should be handled by the mqtt process.

But if you really want to be able to reach it in BASIC I think you should be able to do that like this:

OPEN and the EBD $dtRE$ftT

Hello Tim,

For my application, every transaction is important and I can not lose any. I use QoS = 1 to make sure I have at least one transaction that is received by the MQTT broker “QoS level 1 guarantees that a message is delivered at least one time to the receiver”. But, currently, I have no information on the BASIC side that confirms to me that the MQTT transaction is well concluded.

I do not want to replace the MQTT process, I only need to have confirmation that the job is done before sending another one. In the event that the process is unable to complete the transaction, I only want to be able to temporarily archive it for later retrying. I can not lose any exchange and I need confirmation from receiver.

The use of OPEN and the EBD $dtRE$ftT is not very interesting.

Thank you
Christian

Hello Tim,

To solve my problem, I would like to have a command like ONMQTTPUBLISHCOMPLETED.

Thank you
Christian

Hi Christian,

I could make a request to have a command like “ONMQTTPUBLISHCOMPLETED” but it would depend on how much time the developers have to create this command. My colleague said this though.

The MQTT Client in Flexy will store in RAM all message that could not been sent during the time needed to detect the disconnection (see keep alive)

then you’ll you status tag switching to <> 5 and you can then store messages yourself when the connection comes back the Flexy will send all messages stored in RAM and your script will send all messages saved in the text file

Hi Tim,

I’m already using this strategy (with MQTT Status Tag) to save my data locally. There are some cases where I lose the data that is in RAM (when closing the machine in the event of a failure).

I am ready to wait for this new function :grinning:

Thank you
Christian

Hi Christian,

He said he can enter that request to the developers but he had a few questions:

Good morning Tim,

1- I use the FW 14.0 S0
2- I use a program similar to Simon’s code. In my case, I have an extra file while I transfer the saved information, for not to lose new acquisitions.

Thank you
Christian

Topic closed due to inactivity.