greptimedb
greptimedb copied to clipboard
supports write in MQTT protocol
What problem does the new feature solve?
MQTT protocol is very important in IOT industry, we should support it.
ref:
- https://mqtt.org/
What does the feature do?
Insert metrics into our db in MQTT protocol.
Implementation challenges
- One implementation option:
Use EMQX's "Data Bridges" feature to write data into GreptimeDB.
In general, we can simply create a webhook of it (see its "Quick Start" ), then EMQX will call the specified http endpoint. The http endpoint is exposed by GreptimeDB, and through which we ingest the data feed by EMQX.
EMQX uses "Rules" to extract fields from input data and assemble output data, we might need to design a request protocol, specify the required params.
Also, aside from a table for storing mqtt data, GreptimeDB might need a mqtt "status" table, to store the various "events" emitted by EMQX.
- Another implementation option:
TBD
I don't think we can impl the whole MQTT protocol in GreptimeDB, it's really complicated.
I think we can impl an ~~EMQX plugin~~ EMQ bridge to write data from EMQ into greptimedb.
https://docs.emqx.com/en/enterprise/v4.2/bridge/bridge.html
Typically we don't expose MQTT directly to IoT devices because that layer has its own authentication, data validation and device management business logic.
In most case we need to bridge our customer's internal kafka/pulsa/pravega queues to our db. These bridges can be implemented in our solution products.
Is this supported? @killme2008
I am developing a data bridge for EMQX https://github.com/killme2008/emqx/pull/3 and i'll create a PR this week.
This issue can be closed, we don't support the MQTT protocol directly in GreptimeDB, but provide this data bridge.
only used in emqx enterprise version?