ekuiper: Kuiper 0.2.1 - Cannot get message from edgex

edgex.yaml configuration as following, but cannot receive message.

Running env:Use 0.2.1 version, and compiled to native binary, EdgeX is Fuji, and used docker-compose in Ubuntu OS. Use app-service pipeline mqtt and zmq to pub message, but Kuiper cannot receive any message.

default: protocol: tcp server: localhost port: 5570 #What’s port? EdgeX does not have this port, is ZeroMQ or MQTT port? It seems neither of both? topic: events serviceServer: http://localhost:10080 #What is port 10080?If it’s /api/v1/valuedescriptor, it should be 48080 of edgex

#Override the global configurations application_conf: #Conf_key protocol: tcp server: localhost port: 5571 topic: application

Stream created, and no field definitions, but cannot receive any message.

root@ubuntu:~/kuiper/_build/kuiper-0.2.1-linux-amd64# bin/cli create stream demo'() WITH (FORMAT="JSON", TYPE="edgex")'
Connecting to 127.0.0.1:20498... 
Stream demo is created.

[1]+  Killed                  bin/cli query
root@ubuntu:~/kuiper/_build/kuiper-0.2.1-linux-amd64# bin/cli describe stream demo
Connecting to 127.0.0.1:20498... 

Fields
------------------------------------------------------

FORMAT: JSON
TYPE: edgex


root@ubuntu:~/kuiper/_build/kuiper-0.2.1-linux-amd64# bin/cli query
Connecting to 127.0.0.1:20498... 
kuiper > select * from demo;
Query was submit successfully.
kuiper > 

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15

Most upvoted comments

@jinfahua

The message can be retrieved, but there is a problem: the stream can only find the following format:

[{“rotationrate”:2880}][{“temperature”:27.56395}] [{“humidity”:95.48503}] [{“bool”:true}][{“rotationrate”:4}][{“temperature”:6.945715}] [{“humidity”:4.094852}] [{“rotationrate”:5819}][{“temperature”:21.14119}] [{“bool”:false}] [{“humidity”:55.49818}] [{“rotationrate”:5442}][{“temperature”:11.64447}]

But,the original fields of edgex events, such as devicename, id, orgin, cannot be obtained in the stream. The edgex event original format is maintained in the stream establishment. The original format is as follows:

{
	"id": "9ca84f73-c9dd-45be-b494-f6e4361e5c49",
	"device": "RotationRate-Device",
	"origin": 1584355563897550720,
	"readings": [{
		"id": "2353187f-70c5-44fe-a434-928367c5cab4",
		"origin": 1584355563885392388,
		"device": "RotationRate-Device",
		"name": "RotationRate",
		"value": "1176"
	}]
}

In addition, when sinking to edgex, the same format as above is also maintained. So that the edgex pipeline can consume zmq message from kuiper normally, just like zmq (5563) which consumes edgex-core-data

Thank you very much!

@lesliechung88 Thanks for your feedback… Could you please read How to use meta function to extract additional data from EdgeX message bus?. We provided a function named meta to get these data.