简体   繁体   English

如何将数据从传感器加载到CrateDB?

[英]How to load data from a sensor into CrateDB?

We have a sensor that publishes data to a TCP socket. 我们有一个将数据发布到TCP套接字的传感器。

How could we create an ingest rule in CrateDB to read from that specific socket? 我们如何在CrateDB中创建一个接收规则以从该特定套接字读取?

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? 我们是否需要使用MQTT从Socket读取数据,然后将其作为主题发布,以便CrateDB提取规则可以读取它?

Such approach sounds inefficient. 这种方法听起来效率低下。 We would like to populate the table with data directly from the TCP socket. 我们想直接用TCP套接字中的数据填充表。 Is that possible? 那可能吗?

No this is currently not possible inside CrateDB. 否,目前在CrateDB中这是不可能的。 Also please aware that the MQTT implementation at CrateDB is deprecated and will be removed in future versions, https://crate.io/docs/crate/reference/en/latest/admin/ingestion/sources/mqtt.html . 还请注意,CrateDB上的MQTT实现已被弃用,并将在以后的版本https://crate.io/docs/crate/reference/en/latest/admin/ingestion/sources/mqtt.html中删除。 Main reasons are that the current implementation was very limited (eg 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... 主要原因是当前的实现非常有限(例如仅实现MQTT服务质量(QoS)级别),使用专用的MQTT摄取服务在规则定义和协议支持等方面更加灵活。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM