How to load data from a sensor into CrateDB?

We have a sensor that publishes data to a TCP socket.

How could we create an ingest rule in CrateDB to read from that specific socket?

Do we need to use MQTT to read data from the Socket and then publish it as topics so a CrateDB ingest rule can read it?

Such approach sounds inefficient. We would like to populate the table with data directly from the TCP socket. Is that possible?

No this is currently not possible inside CrateDB. Also please aware that the MQTT implementation at CrateDB is deprecated and will be removed in future versions,

Main reasons are that the current implementation was very limited (e.g only implements MQTT Quality of Service (QoS) level one), using a dedicated MQTT ingest service is much more flexible in rule definition and protocol support, etc.

@yash what is the recommended way to ingest data from MQTT? Thanks!

@robmarkcole you could use telegraf:

I would recommend the approach described in Ingesting MQTT messages into CrateDB using Node-RED - Tutorials - CrateDB Community

1 Like