Skip to content

Instantly share code, notes, and snippets.

@Sammers21
Created June 7, 2017 13:11
Show Gist options
  • Save Sammers21/9159fbd49a558052a7f67f5b7639271f to your computer and use it in GitHub Desktop.
Save Sammers21/9159fbd49a558052a7f67f5b7639271f to your computer and use it in GitHub Desktop.
Description of how Mqtt-publishing works
/*
Client-server interaction on different QOS levels
QOS =0
if server would like to publish something to the client
_______________________________________________________________
server
---PUBLISH---->
client
_______________________________________________________________
if client would like to publish something to the client
_______________________________________________________________
client
---PUBLISH---->
server
_______________________________________________________________
###############################################################
###############################################################
###############################################################
QOS =1
if server would like to publish something to the client
_______________________________________________________________
server
---PUBLISH---->
client
<---PUBACK----
server
________________________________________________________________
if client would like to publish something to the client
client
---PUBLISH---->
server
<---PUBACK----
client
_______________________________________________________________
###############################################################
###############################################################
###############################################################
QOS=2
if server would like to publish something to the client
_______________________________________________________________
server
---PUBLISH---->
client
<---PUBREC----
server
---PUBREL---->
client
<---PUBCOMP---
server
_______________________________________________________________
if client would like to publish something to the client
_______________________________________________________________
client
---PUBLISH---->
server
<---PUBREC----
client
---PUBREL---->
server
<---PUBCOMP---
client
_______________________________________________________________
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment