1

There is a manual to get the LEC with REST API, but in my device I have MQTT protocol. My device is not always connected to internet, so when it is online it needs to get the Last Event sent.

Here is the LEC in REST protocol: https://www.ibm.com/support/knowledgecenter/SSQP8H/iot/platform/reference/lec/index.html

In the Device side, I can only subscribe on the command like this("iot-2/cmd/commandR1/fmt/json"), but it's not returning the last command.

And IBM MQTT broker doesn't work with retained messages.

If an application, gateway, or device sends a retained message, the Platform Service service overrides the retained message flag when it is set to true and processes the message as if the flag is set to false. (https://www.ibm.com/support/knowledgecenter/SSQP8H/iot/platform/applications/mqtt.html)

Bruno Yuzo
  • 469
  • 5
  • 18
  • 1
    This was the solution, working with Qos > 0 (Quality of Service) https://stackoverflow.com/questions/34150452/receive-offline-messages-mqtt – Bruno Yuzo Apr 28 '20 at 20:43

0 Answers0