storageTopic: MQTT topic where this service should send messages if there is no connection available so they can be stored.
connTopic: MQTT topic where this service publishes updates of the status of the connection.
dataTopic: MQTT topic where this service listens for messages it should publish to the AMQP broker.
cacert: Path to the CA certificate.
clcert: Path to the client certificate.
clkey: Path to the client key.
How it works
If certificates and keys are provided the service tries to connect using TLS. Otherwise it connects without encryption.
When providing certificates for TLS connection make sure that you update the needed files in the certs folder before starting the image.
The service listens in dataTopic for messages to be published. The format of the message shall be in JSON as '{"exchange":"exc","key":"routing_key","payload":"payload_to_send"}'.
When the service detects a loss of connection it notifies it through connTopic by sending a '0'. It tries to reconnect to the other endpoint each 5 seconds.
When the connection is recovered a '1' is sent through connTopic.