...
- Event Formatter Name - Property that used to uniquely identify a event formatter configuration.
- Event Stream - Can select a event stream (Stream name with version) where you going to listen for events, It is numbered as "1".
- Stream Attributes - Based on the event stream selected, It shows what are the attributes available at that stream. (It is only for reference when creating output mapping)
- Output Transport Event Adaptor Name - Transport Event adaptor which you going to use to publish the events from CEP. (Output Transport Event Adaptors which are created are listed here). It is numbered as "2". Based on the Transport Event Adaptor that selected sections "3", "4" and "5" will change accordingly.
- Output Mapping Type - This property can be change based on the transport event adaptor selected. Some transport event adaptors can support for multiple types of mappings. User can select the required mapping type from the list. Is is numbered as "3".
- Topic - Since, you have selected ws-event-local type transport event adaptor "localWsEventSender"; you need a Topic which can used when subscribing the events by the receiver.
...
Code Block | ||
---|---|---|
| ||
<eventFormatter name="xmlEventFormatter" xmlns="http://wso2.org/carbon/eventformatter"> <from streamName="stockStream" version="1.0.0"/> <mapping type="xml"> <inline> <quotedata:StockQuoteDataEvent xmlns:quotedata="http://ws.cdyne.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <quotedata:StockSymbol>{{symbol}}</quotedata:StockSymbol> <quotedata:LastTradeAmount>{{price}}</quotedata:LastTradeAmount> </quotedata:StockQuoteDataEvent> </inline> </mapping> <to transportAdaptorNameeventAdaptorName="localWsEventSender" transportAdaptorTypeeventAdaptorType="ws-event-local"> <property name="topic">FastMovingStockQuotes</property> </to> </eventFormatter> |