User-MQTT Connector
User MQTT is designed to let you connect your data system to the output of the Centiloc data platform.
From here, you will consume all the qualified events generated by Items acting with Boards. Thus, you can update in your own storage system, the location and status of your different items.
Here are some recommendations to maximize the quality of this connection.
Once you are connected to the MQTT, you will start collecting events from the Centiloc data platform. But what happened before this connection ?
To make sure your data system is up-to-date, we advise you to get the content of your boards, right after having connected to the User-MQTT. Using the momentum field of the data collected, you can easily compare and check if your storage is matching the reality or not.
For multiple reasons, the connection to this User-MQTT may be broken. Make sure your connection driver allows automatic reconnection.
In such case, you may consume events generated during the connection off. Anyway, we encourage you to rely on checking your starting point status, more than this event collection.
ClientID
: should be unique. You shall prefix this data with yourtenantID
.CleanSession
: This could be setfalse
so that you can retrieve events that have not beed consumed, in case of disconnection… but, depending on the time of disconnection, you might lose events anyway. **We advise you to set this parameter totrue
and rely on API request to collect the lost data.
Centiloc MQTT supports shared subscription. This means you can connect multiple client over which the MQTT broker will load balances the events generated.
To use it, you need to subscribe to $share/<GROUPID>/topic
, where <GROUPID>
is defined by your means.
In the same mindset as clientID
, we ask your to prefix the <GROUPID>
with your tenantID
.
The events are encoded in protobuf with transtreamdatamodel package.
Every minor evolution of the package will be published on the same centiloc/<tenantID>
topic. The deserialization of the message will do the compatibility job.
If the time comes for a major version, bringing breaking changes, the topic to come will be
centiloc/<tenantID>/<majorRev>
.But the events in previous lower versions will, of course, still be generated.