What types of objects are supported by Siddhi for the attribute type "object"?

I am doing some prototype experiments using Siddhi as the CEP mechanism and would like to know if the input streams only support flat event data or can support the JSON data hierarchy for requests.

Siddhi documentation refers to a type objectfor attributes, but I could not find anything that this type refers to.

In the code examples provided in the source repository , this attribute type is also never used.

Extending one of the queries written in these examples, I would like to do something like:

String executionPlan = ""
    + "define stream cseEventStream (symbol string, price float, volume long, data object); "
    + " "
    + "@info(name = 'query1') "
    + "from cseEventStream[volume < 150 and data.myKey == 'myValue'] "
    + "select symbol,price "
    + "insert into outputStream ;";

Is there any JSON-like data supported by Siddhi? If so, what types of Java objects should be passed in InputHandler?

+4
source share
1 answer

It accepts instances of java.lang.Object. This way you can pass any Java object. But these objects pass only through the passage (the Siddhi engine simply passes them along with the event), and you will not be able to make any changes / processing of these objects unless you write some kind of user extension.

json, WSO2 CEP. json , string, int, float .., .

+3

Source: https://habr.com/ru/post/1614448/


All Articles