0

I am using Raspberry Pi as Thingsboard gateway and pushing sensor readings to server successfully. The Server may not be always online. Where does the data goes in case of server goes offline for long duration? Is there any storage in the Thingsboard gateway?

2 Answers2

2

The "Thingsboard gateway" doesn't have database like Thingsboard Server application but it stores the MQTT messages in case of disconnection from the remote server.

As mentioned the Thingsboard gateway is on Raspberry Pi so go to following directory and make the changes:-

          sudo nano /etc/tb-gateway/conf/tb-gateway.yml

there you will find the "gateway.connection.maxInFlight" which represents maximum amount of pending publish messages. Pending messages are messages that are either not sent due to connection problem or not yet confirmed due to high load on Thingsboard Server. Its default value is 1000 (messages). In case of per minute publish cycle ~16 hours of disconnection will be handled by the system.

2

The persistence settings are configured in the /etc/tb-gateway/conf/tb-gateway.yml file. You can have either “file” or “memory” message persistence. In the latter case data is only memorized in dynamic memory of tb-gateway service, so the following considerations apply only for the "file" option.

The path where data will be stored in case of connection issues between the gateway and the server is also specified in tb-gateway.yml. Default location in Raspbain is: /usr/share/tb-gateway/bin/storage/

AbCthings
  • 116
  • 9