0

I want to build a CEP-Engine which is dynamic so you can add different event streams. As soon as a new stream is added, Esper should be able to read all the properties of the stream and put it into a list, for example. (For example integer id, long temperature, date timestamp etc.) Is this possible in Esper?

Would be very grateful for any help

n.muc.ruh
  • 1
  • 1

2 Answers2

0

In order to add a stream at runtime you can use create-schema.

create schema MyStream(id int, ...)

For a stream that accepts events that an application sends using EPEventServive#sendEvent you should add the bus and public annotation (or set the equivalent compiler flags).

@public @buseventtype create schema MyStream(id int, ...)

You can now use this stream.

select * from MyStream

You can attach a listener and have it do some logic. The Esper examples have a lot of detail. The create-schema is used in the "runtimeconfig" example.

user3613754
  • 816
  • 1
  • 5
  • 5
  • Thank you for answering.I'm afraid I didn't make myself clear. I want to be able to add event streams where I don't know beforehand what kind of properties the events have. So I don't know before if there is an integer ID or if there is a date timestamp and which payload might be there. As soon as I add such an unknown event, Esper should examine the stream and return the contained properties of the stream to me. – n.muc.ruh Dec 01 '20 at 16:24
  • See answer to https://stackoverflow.com/questions/65094492/add-unknown-eventstreams-to-cep-engine-and-get-a-list-of-all-properties-payload – user3613754 Dec 01 '20 at 17:40
0

Thank you for answering. I'm afraid I didn't make myself clear. I want to be able to add event streams where I don't know beforehand what kind of properties the events have. So I don't know before if there is an integer ID or if there is a date timestamp and which payload might be there. As soon as I add such an unknown event, Esper should examine the stream and return the contained properties of the stream to me.

n.muc.ruh
  • 1
  • 1