Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » MQTT Embedded Client C doesn't support retransmissions(MQTT retransmissions)
MQTT Embedded Client C doesn't support retransmissions [message #1780686] Thu, 25 January 2018 17:36 Go to next message
Dario Cillerai is currently offline Dario CilleraiFriend
Messages: 5
Registered: January 2018
Junior Member
Hello,

inspecting the code, it seems that MQTT embedded client in C doesn't support message retransmission when QOS > 0, as requested by the specification (Section 4.1 paragraph QOS Level 1):

"If the client does not receive a PUBACK message (either within a time period
defined in the application, or if a failure is detected and the communications
session is restarted), the client may resend the PUBLISH message with the DUP flag set."

In fact, in function MQTTPublish, if the send fails, an error code is simply returned.

Am I wrong?
Is there a reason for this?

Thanks
Re: MQTT Embedded Client C doesn't support retransmissions [message #1780866 is a reply to message #1780686] Mon, 29 January 2018 11:20 Go to previous messageGo to next message
Ian Craggs is currently offline Ian CraggsFriend
Messages: 68
Registered: March 2013
Member
Hello.

it looks like you are reading the MQTT 3.1 specification which is pre-OASIS standardisation. The current spec is 3.1.1: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.pdf, which does not mention packet retries while the TCP connection remains active. The only requirement is that any outstanding QoS 1 or 2 flows are retried on the re-establishment of a TCP connection.

From personal experience I can attest that retries during an active connection usually cause more trouble than any help. The most common situation for a delay in an ack is that something is overloaded, network or broker for instance, and retrying packets only exacerbates the problem! If the TCP connection has failed or is failing, then a retrying on reconnection is all you need.
Re: MQTT Embedded Client C doesn't support retransmissions [message #1780890 is a reply to message #1780866] Mon, 29 January 2018 15:58 Go to previous message
Dario Cillerai is currently offline Dario CilleraiFriend
Messages: 5
Registered: January 2018
Junior Member
Thanks Ian,

I'll read the new specification.

The reason for my request is that I have only UDP available and I'm looking for a way to make communication reliable.
In particular, my physical interface is Narrowband IoT and current chipsets offers only UDP to exchage packets in the network.
Possibly, I would have to implement retransmisssion in the library and make sure that the server support QOS > 0 and retransmission.

Bye
Previous Topic:PAHO library in C
Next Topic:Paho MQTT
Goto Forum:
  


Current Time: Sat Nov 17 06:19:59 GMT 2018

Powered by FUDForum. Page generated in 0.02285 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top