Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Not understanting the specifications

The PUBACK is sent before the callback - my feeling these days is that it should probably be after though.

Regards,

Roger

On Thu, 12 Aug 2021, 13:00 yves baumes, <ybaumes@xxxxxxxxx> wrote:
Thank you Roger for your answer,

it is much clearer, but I'd like to make sure it is clear:

"so the PUBLISH/PUBACK should happen straight away."
Let's say I have a subscriber client , making REST api calls to a remote service when receiving PUBLISH msgs. Does the mosquitto library send the PUBACK right away, before calling the `on_message()` callback? Or does it wait until I return from this callback, thus sending the PUBACK after the call of this callback?

I hope my question is clear,
Regards  

Le jeu. 12 août 2021 à 13:29, Roger Light <roger@xxxxxxxxxx> a écrit :
Hi Yves,

The messages should be stored for QoS>0, yes. The publisher flow is separate to the subscriber flow though, so the PUBLISH/PUBACK should happen straight away. It won't always be possible to deliver a message to a subscriber immediately, so waiting for all subscriber flows to complete would be a mistake.

Regards,

Roger

On Thu, 12 Aug 2021, 11:50 yves baumes, <ybaumes@xxxxxxxxx> wrote:
Hello,

I'm reading the mqtt specifications mqtt-v5.0.pdf. And I should say that I am a little bit lost, especially concerning the QOS2 messages (PUBREC, PUBREL and PUCOMP workflow).

But for the moment I'd like to stick with simple questions concerning the QOS1 messages and workflow.

Section "4.3.2 QOS1: At least once delivery ", more precisely concerning the figure 4.2: isn't there a missed "store message" on the receiver side, when the receiver gets the publish msg?

Let's say the receiver is a Broker: shouldn't it store the PUBLISH msg, and then send the PUBACK msg back to the sender? Or ... initiate and *complete* delivery to subscribers and only then send back the PUBACK msg? The specifications look like it states that the message ownership may be transferred quite lightly, doesn't it defeat the purpose of message queuing? 

Thank you for answering, I hope my questions are clear. Excuse me if it is not, I am not a native English speaker.

Regards,
Yves Baumes.

_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top