How to Create a Channel Component Configuration File Manually

9-16 Oracle Complex Event Processing Developers Guide For more information, Section D.78, selector . 6. Save and close the configuration file.

9.3 Example Channel Configuration Files

Figure 9–4 shows part of an EPN that contains two channels: priceStream and filteredStream. The priceStream channel is an in-bound channel that connects the PriceAdapter event source and its PriceEvent events to an Oracle CQL processor filterFanoutProcessor. The filteredStream channel is an out-bound channel that connects the Oracle CQL processor’s query results FilteredPriceEvent events to down-stream components not shown in Figure 9–4 . Figure 9–4 EPN with Two Channels This section provides example channel configuration files, including: ■ Section 9.3.1, Channel Component Configuration File ■ Section 9.3.2, Channel EPN Assembly File

9.3.1 Channel Component Configuration File

Example 9–16 shows a sample component configuration file that configures the two channels shown in Figure 9–4 . Example 9–16 Sample Channel Component Configuration File ?xml version=1.0 encoding=UTF-8? n1:config xmlns:n1=http:www.bea.comnswlevsconfigapplication xmlns:xsi=http:www.w3.org2001XMLSchema-instance processor namefilterFanoutProcessorname rules query id=Yr3Sector[CDATA[ select cusip, bid, srcId, bidQty, ask, askQty, seq from priceStream where sector=3_YEAR ]]query rules processor channel namepriceStreamname max-size10000max-size max-threads4max-threads channel channel namefilteredStreamname max-size5000max-size Note: The selector attribute is only applicable if the up-stream node is an Oracle CQL processor. For more information, see Chapter 10, Configuring Oracle CQL Processors . Configuring Channels 9-17 max-threads2max-threads channel n1:config

9.3.2 Channel EPN Assembly File

Example 9–17 shows a EPN assembly file that configures the two channels shown in Figure 9–4 . Example 9–17 Channel EPN Assembly File ?xml version=1.0 encoding=UTF-8? beans xmlns=http:www.springframework.orgschemabeans xmlns:xsi=http:www.w3.org2001XMLSchema-instance xmlns:osgi=http:www.springframework.orgschemaosgi xmlns:wlevs=http:www.bea.comnswlevsspring xmlns:cqlx=http:www.oracle.comschemacqlx xsi:schemaLocation= http:www.springframework.orgschemabeans http:www.springframework.orgschemabeansspring-beans.xsd http:www.springframework.orgschemaosgi http:www.springframework.orgschemaosgispring-osgi.xsd http:www.bea.comnswlevsspring http:www.bea.comnswlevsspringspring-wlevs-v11_1_1_3.xsd wlevs:event-type-repository wlevs:event-type type-name=PriceEvent wlevs:properties wlevs:property name=cusip type=java.lang.String wlevs:property name=bid type=java.lang.Double wlevs:property name=srcId type=java.lang.String wlevs:property name=bidQty type=java.lang.Integer wlevs:property name=ask type=java.lang.Double wlevs:property name=askQty type=java.lang.Integer wlevs:property name=seq type=java.lang.Long wlevs:property name=sector type=java.lang.String wlevs:properties wlevs:event-type wlevs:event-type type-name=FilteredPriceEvent wlevs:properties wlevs:property name=cusip type=java.lang.String wlevs:property name=bid type=java.lang.Double wlevs:property name=srcId type=java.lang.String wlevs:property name=bidQty type=java.lang.Integer wlevs:property name=ask type=java.lang.Double wlevs:property name=askQty type=java.lang.Integer wlevs:property name=seq type=java.lang.Long wlevs:properties wlevs:event-type wlevs:event-type type-name=BidAskEvent wlevs:properties wlevs:property name=cusip type=java.lang.String wlevs:property name=bidseq type=java.lang.Long wlevs:property name=bidSrcId type=java.lang.String wlevs:property name=bid type=java.lang.Double wlevs:property name=askseq type=java.lang.Long wlevs:property name=askSrcId type=java.lang.String wlevs:property name=ask type=java.lang.Double wlevs:property name=bidQty type=java.lang.Integer wlevs:property name=askQty type=java.lang.Integer wlevs:property name=intermediateStrategy type=java.lang.String wlevs:property name=correlationId type=java.lang.Long wlevs:property name=priority type=java.lang.Integer wlevs:properties wlevs:event-type 9-18 Oracle Complex Event Processing Developers Guide wlevs:event-type type-name=FinalOrderEvent wlevs:properties wlevs:property name=cusip type=java.lang.String wlevs:property name=bidseq type=java.lang.Long wlevs:property name=bidSrcId type=java.lang.String wlevs:property name=bid type=java.lang.Double wlevs:property name=bidQty type=java.lang.Integer wlevs:property name=bidSourceStrategy type=java.lang.String wlevs:property name=askseq type=java.lang.Long wlevs:property name=askSrcId type=java.lang.String wlevs:property name=ask type=java.lang.Double wlevs:property name=askQty type=java.lang.Integer wlevs:property name=askSourceStrategy type=java.lang.String wlevs:property name=correlationId type=java.lang.Long wlevs:properties wlevs:event-type wlevs:event-type-repository -- Assemble EPN event processing network -- wlevs:adapter advertise=true id=PriceAdapter provider=csvgen wlevs:instance-property name=port value=9008 wlevs:instance-property name=eventTypeName value=PriceEvent wlevs:instance-property name=eventPropertyNames value=srcId,sector,cusip,bid,ask,bidQty,askQty,seq wlevs:adapter wlevs:channel id=priceStream event-type=PriceEvent wlevs:listener ref=filterFanoutProcessor wlevs:source ref=PriceAdapter wlevs:channel -- By default, CQL is used for OCEP 11.0 -- wlevs:processor id=filterFanoutProcessor wlevs:processor wlevs:channel id=filteredStream event-type=FilteredPriceEvent wlevs:listener ref=bbaProcessor wlevs:listener ref=analyticsProcessor wlevs:source ref=filterFanoutProcessor wlevs:channel -- Explicitly specify provider CQL -- wlevs:processor id=bbaProcessor provider=cql wlevs:listener ref=bidAskBBAStream wlevs:processor wlevs:processor id=analyticsProcessor wlevs:listener ref=bidAskAnalyticsStream wlevs:processor wlevs:channel id=bidAskBBAStream event-type=BidAskEvent wlevs:listener ref=selectorProcessor wlevs:channel wlevs:channel id=bidAskAnalyticsStream event-type=BidAskEvent wlevs:listener ref=selectorProcessor wlevs:channel wlevs:processor id=selectorProcessor wlevs:listener ref=citipocOut wlevs:processor wlevs:channel id=citipocOut event-type=FinalOrderEvent advertise=true Configuring Channels 9-19 wlevs:listener -- Create business object -- bean id=outputBean class=com.bea.wlevs.POC.citi.OutputBean autowire=byName wlevs:listener wlevs:channel beans