Skip to content
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

MQTT client capability: QoS1, QoS2 #1970

Closed
zephyrbot opened this issue May 28, 2016 · 8 comments
Closed

MQTT client capability: QoS1, QoS2 #1970

zephyrbot opened this issue May 28, 2016 · 8 comments
Labels
Enhancement Changes/Updates/Additions to existing features priority: high High impact/importance bug
Milestone

Comments

@zephyrbot
Copy link
Collaborator

zephyrbot commented May 28, 2016

Reported by Anas Nashif:

As a user, I want to use Zephyr to send data using MQTT to a broker with quality of services 1 and 2.

MQTT uses a “publish/subscribe” model and requires a central MQTT broker to manage and route messages among an MQTT network’s nodes. Eclipse describes MQTT as “a many-to-many communication protocol for passing messages between multiple clients through a central broker.” It uses TCP for its transport layer, which is characterised as “reliable, ordered and error-checked.”

QoS1, At least once: The message is always delivered at least once. It might be delivered multiple times if there is a failure before an acknowledgment is received by the sender. The message must be stored locally at the sender, until the sender receives confirmation that the message has been published by the receiver. The message is stored in case the message must be sent again.

QoS2, Exactly once: The message is always delivered exactly once. The message must be stored locally at the sender, until the sender receives confirmation that the message has been published by the receiver. The message is stored in case the message must be sent again. QoS2 is the safest, but slowest mode of transfer. A more sophisticated handshaking and acknowledgement sequence is used than for QoS1 to ensure no duplication of messages occurs.

(Imported from Jira ZEP-416)

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Jun 27, 2016

by Flavio Santes:

MQTT QoS 0, 1 and 2 is in testing. This code is on top of GH-2015.

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Jul 7, 2016

by Flavio Santes:

So far, we are blocked by GH-2067. This issue breaks the build system for applications requiring source files in directories other than src.

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Jul 8, 2016

by Flavio Santes:

GH-2067 was fixed by https://gerrit.zephyrproject.org/r/#/c/2923/

@zephyrbot
Copy link
Collaborator Author

by Lei Liu:

MQTT Publish QoS0, QoS1, QoS2 message.
{code:title=Server log|borderStyle=solid}
1470580627: New client connected from 192.168.2.100 as zephyr (c1, k0).
1470580627: Sending CONNACK to zephyr (0, 0)
1470580627: Received PUBLISH from zephyr (d0, q0, r0, m0, 'zephyr', ... (3 bytes))
1470580642: Received PUBLISH from zephyr (d0, q1, r0, m1, 'zephyr', ... (3 bytes))
1470580642: Sending PUBACK to zephyr (Mid: 1)
1470580671: New connection from 127.0.0.1 on port 1883.
1470580671: New client connected from 127.0.0.1 as mosq_sub_30810_alvin (c1, k60).
1470580671: Sending CONNACK to mosq_sub_30810_alvin (0, 0)
1470580671: Received SUBSCRIBE from mosq_sub_30810_alvin
1470580671: zephyr (QoS 0)
1470580671: mosq_sub_30810_alvin 0 zephyr
1470580671: Sending SUBACK to mosq_sub_30810_alvin
1470580675: Received PUBLISH from zephyr (d0, q2, r0, m2, 'zephyr', ... (3 bytes))
1470580675: Sending PUBREC to zephyr (Mid: 2)
1470580675: Received PUBREL from zephyr (Mid: 2)
1470580675: Sending PUBCOMP to zephyr (Mid: 2)
{code}

MQTT subscribe QoS0, QoS1, QoS2 topic
{code:title=Server log|borderStyle=solid}
1470580792: Received SUBSCRIBE from zephyr
1470580792: sensors (QoS 0)
1470580792: zephyr 0 sensors
1470580792: Sending SUBACK to zephyr

1470581266: Received SUBSCRIBE from zephyr
1470581266: sensors (QoS 1)
1470581266: zephyr 1 sensors
1470581266: Sending SUBACK to zephyr
1470581268: New connection from 127.0.0.1 on port 1883.
1470581268: New client connected from 127.0.0.1 as mosq_pub_30843_alvin (c1, k60).
1470581268: Sending CONNACK to mosq_pub_30843_alvin (0, 0)
1470581268: Received PUBLISH from mosq_pub_30843_alvin (d0, q1, r0, m1, 'sensors', ... (2 bytes))
1470581268: Sending PUBACK to mosq_pub_30843_alvin (Mid: 1)
1470581268: Sending PUBLISH to zephyr (d0, q1, r0, m1, 'sensors', ... (2 bytes))
1470581268: Received DISCONNECT from mosq_pub_30843_alvin
1470581268: Client mosq_pub_30843_alvin disconnected.
1470581268: Received PUBACK from zephyr (Mid: 1)
1470581306: Received SUBSCRIBE from zephyr
1470581306: sensors (QoS 2)
1470581306: zephyr 2 sensors
1470581306: Sending SUBACK to zephyr
{code}

Zephyr: v1.5.0-rc1

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Aug 8, 2016

References GH-1779

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Aug 8, 2016

Related to GH-1779

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Aug 8, 2016

Related to GH-2099

@zephyrbot
Copy link
Collaborator Author

zephyrbot commented Aug 8, 2016

Related to GH-2104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features priority: high High impact/importance bug
Projects
None yet
Development

No branches or pull requests

1 participant