Is your feature improvement request related to a problem? Please describe.
The tedge-mapper-c8y sends the init messages to the Cumulocity cloud when it starts for the first time
These messages like inventory_fragments_message, supported_operations_message, device_data_message, pending_operations_message, cloud_child_devices_message.
The mapper depends on the mqtt bridge to communicate with the cumulocity cloud. In the current implementation, these messages are sent without checking the bridge status., whether the bridge is established or not. So, if the bridge is not established the messages will be lost. This will have a bad experience for the further operation of thin-edge.io.
Describe the solution you'd like
The proposed solution is first to check that the bridge is established or not before sending out the init messages that are mentioned above. If the bridge is not established, then the mapper must defer and wait till the bridge gets established.
Mapper can subscribe to tedge/health/mosquitto-c8y-bridge topic to check the health status of the bridge.
The init message can be sent either the status of the bridge is up/down. That means the bridge must be established, if its not up at present then the Mosquitto broker can buffer those messages and can deliver once it comes up.
Describe alternatives you've considered
Additional context
This will be helpful when the thin-edge components run on different containers. For example tedge-mapper running on an independent container than the mosquitto broker in another then will be more useful.
Is your feature improvement request related to a problem? Please describe. The
tedge-mapper-c8y
sends theinit
messages to the Cumulocity cloud when it starts for the first time These messages likeinventory_fragments_message, supported_operations_message, device_data_message, pending_operations_message, cloud_child_devices_message
.The mapper depends on the
mqtt bridge
to communicate with the cumulocity cloud. In the current implementation, these messages are sent without checking thebridge status
., whether the bridge is established or not. So, if the bridge is not established the messages will be lost. This will have a bad experience for the further operation of thin-edge.io.Describe the solution you'd like The proposed solution is first to check that the bridge is established or not before sending out the
init
messages that are mentioned above. If the bridge is not established, then the mapper must defer and wait till the bridge gets established. Mapper can subscribe totedge/health/mosquitto-c8y-bridge
topic to check the health status of the bridge. The init message can be sent either the status of the bridge isup/down
. That means the bridge must be established, if its not up at present then theMosquitto
broker can buffer those messages and can deliver once it comes up.Describe alternatives you've considered
Additional context This will be helpful when the thin-edge components run on different containers. For example
tedge-mapper
running on an independent container than themosquitto
broker in another then will be more useful.