javier-fg / mqtt-spb-wrapper

This python module implements a wrapper around the Eclipse Tahu Sparkplug B v1.0 core modules, to easily create and handle MQTT Sparkplug B entities in Python in an easy way.
Eclipse Public License 2.0
18 stars 11 forks source link

Node birth messages may not be retained #3

Open pietercardoen opened 1 year ago

pietercardoen commented 1 year ago

Dear

When using your library, I noticed that node birth messages have retained flag set. This is not desirable and in conflict with the sparkplug specification.

The behaviour on edge node disconnect is also not as expected. If an edge node disconnects, the broker must drop the LWT. The edge node doesn't send a DEATH message before disconnecting, then the primary app/other app nodes will never receive the DEATH certificate. Solution for this is to enforce a death message before disconnect.

Kind regards Pieter Cardoen

javier-fg commented 4 months ago

It is intended that on next major release, the birth message will disable the retain flag by default. For compatibility, It will be left active for the time being

javier-fg commented 4 months ago

Latest commit incorporate the publishing of DEATH message upon calling the disconnect function ( it can be also disabled via function parameters). This change will be pushed on next library update.