Skip to content

Understanding errors in the context of an MQTT server #46

Answered by fafhrd91
ctron asked this question in Q&A
Discussion options

You must be logged in to vote

in v5 you can return negative ack for publish message, so TryFrom gives you this ability, you can generate whatever PublishAck you need. if you cannot handle error and need to disconnect connection
you don't convert error and return it, in that case dispatcher calls your control service with ControlMessage::Error message, and you can create proper Disconnect message

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ctron
Comment options

@fafhrd91
Comment options

Answer selected by ctron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants