The Storage Integration allows storing received upstream messages in a persistent database, and retrieving them at a later time.
The Storage Integration is implemented as an Application Package, and can be enabled per application or end device.
How it works
The Storage Integration runs on the Application Server and watches for upstream traffic (join requests, data uplink message, data downlink message, etc). When an upstream message is received from an end device for which the integration has been configured, the message data (Payload, FPort, Decoded Fields, as well as all relevant metadata) are written in a persistent database.
Data retention period is 30 days for The Things Stack Cloud and 24 hours for The Things Stack Sandbox distributions. For The Things Stack Enterprise distributions, data retention period can be configured.
A gRPC service and an HTTP API are exposed so that stored messages can then be retrieved.
Note:
The Things Stack Cloud stores only uplink messages.Warning:
The Storage Integration should not be used for querying realtime data. For scalability reasons, writes to the Storage Integration database are performed in batches and there may be a delay after an uplink is received, before it is available. For realtime alerts, use Webhooks.Typical use cases
- Long-term storage of historical data for end-devices.
- No need to maintain a connection with The Things Stack at all times, e.g. for end devices that send messages infrequently.
Detailed instructions about storage integration are in the topics below.