MQTT APPLICATION Integration

But you already could separate data completely if you want in a secure way:

Option 1

Have a central MQTT broker and integrate this with the PostgreSQL database so that users can login with their own credentials and only see their own data. In this case you might be interested in Go mosquitto auth plugin. Also I’m open to discuss how this could be made easier. For gateways I’m planning to implement automatic TLS certificate generation, which works with most MQTT brokers (e.g. you can use the CN as User ID and then create an ACL with the User ID in the topic template).

Option 2

Use the per-application HTTP integration to post data to an external endpoint. This could for example be a GCP Cloud Function, which publishes the data to GCP Pub/Sub. Same would work for other cloud providers.

2 Likes