Map event formatter converts the events coming from Siddhi to Map events according to the output mapping configurations. Here, each output event is considered as a map object.
Y ou can configure through the management console as explained below or by manually adding an XML file as explained in step 5.
mapmapping type. This drop-down list is populated based on the event adapter selected earlier. It lists only the mapping types supported by a particular event adapter. Some event adapters support multiple types of mappings.
Map event is simply a map object, a <key,value> pair. Name is used as a key in the event and the actual value is used as value attribute.
Here, If you not willing to add advanced mapping properties then CEP will send map events with all the attributes which defined in the stream definition. Here, output map event will be in a predefined event format as shown below.
Here when sending map event, meta attributes need to prefixd with meta_ , correlation attribute needs to prefixed with correlation_ and payload attribute does not need any prefixes. For example,
key : meta_tenant_id , value : 25
<PRODUCT_HOME>/repository/deployment/server/eventformatters directory, which is the event formatter deployment directory. Since hot deployment is enabled, you can simply add/remove files to deploy/undeploy from the server.
Create the XML file with the following Map mapping event formatter configurations. Event formatter implementation must start with
<eventformatter> root element as in the example below.