-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packet in Broker ack
event
#257
Comments
Can you add a code example to explain? I wrote this a long ago, and I do not remember / or I have time to figure this out. |
The code
|
The ack event includes the last packet sent with the given message id. It can be PUBLISH or PUBREL. Given how QoS2 is implemented.. I don’t think it’s feasible to change this. We should probably document all of this better. Would you like to send a PR? |
PUBREL is a control packet, I think it is more logical to be a PUBLISH packet in |
I agree. However that is tied with how the persistence interface is defined: we don’t have the PUBLISH packet anymore. |
In https://github.com/mcollina/aedes/blob/master/lib/handlers/puback.js#L6
Broker receives puback or pubcomp packet will go into puback.js
In non-clean QoS 1, the
origPacket
will be a PUBLISH packetIn non-clean QoS 2, the
origPacket
will be a PUBREL packet.A little bit confusion, should the
packet
inack
event always be the PUBLISH one?In a clean QoS 1 and QoS 2, the
origPacket
will beundefined
. That means we will not get any packet info inack
event, is it by design?The text was updated successfully, but these errors were encountered: