Metadata messages need to set the retain=true
flag for the MQTT message. This is needed to make the metadata available to clients which connect at a later time.
When to publish this message?
- When the connector starts
- When the MetaData has changed
- When the connector has lost the connection to the Databus and reconnects. This is needed because the Databus might has been restarted and lost the value.
Refer also to the
mdHashVer
andhashVersion
fields of the asyncapi definition for more information.