QoS 1 behavior

26 views
Skip to first unread message

Ernesto Garcia

unread,
Mar 7, 2012, 6:35:55 AM3/7/12
to mq...@googlegroups.com
Hi.

I was reading mqtt-s specification.

It says:

"At any point in time a client may have only one QoS level 1 or 2 PUBLISH message outstanding, i.e. it has to
wait for the termination of this PUBLISH message exchange before it could start a new level 1 or 2 transaction."

I understand client refers to publisher node. What happen if the client is working on QoS 1 and it generates a new event to publish , but it has not received the PUBACK of the previous PUBLISH message ?.  In the default behavior, i think it discards the new one until it receives the PUBACK.

Is it correct ?

Thanks for your help and suggestions.


--
Ernesto

Nicholas O'Leary

unread,
Mar 7, 2012, 5:34:35 PM3/7/12
to mq...@googlegroups.com
Hi Ernesto,

as the spec says, an MQTT-S client may only have one qos1/2 publish in
flight at any one time. A client implementation needs to honour that
requirement so it has the following choices:
1. the easiest thing for a client to do is to discard any newly
submitted publishes until the flow completes - leave it to the
application to deal with resubmitting if it needs to,
2. the client could block the call to submit the publish until the
outstanding flow completes - but it may not be appropriate to block
the application like this,
3. thie client could queue the publishes up internally and send it
when the flow completes - but it means the application won't know
if/when the message is eventually sent.

There is not a default behaviour; it is up to the implementation to
decide which approach to take. Each of which has advantages and
disadvantages.

Regards,
Nick

> --
> To learn more about MQTT please visit http://mqtt.org
>
> To post to this group, send email to mq...@googlegroups.com
> To unsubscribe from this group, send email to
> mqtt+uns...@googlegroups.com
>
> For more options, visit this group at
> http://groups.google.com/group/mqtt

Reply all
Reply to author
Forward
0 new messages