Complex Event Processor Configuration
Update the following configuration and artifact files in the Complex Event Processor (CEP):
- Update the port offset of the Complex Event Processor in the in the
carbon.xml
file, which is found in the<CEP_HOME>/repository/conf/
directory as follows:
<offset>4</offset>
The default offset value given to Complex Event Processor in WSO2 Private PaaS is 4. The resulting Complex Event Processor Thrift port is 7615. - Copy the following
stream-manager-config.xml
file from the<PRIVATE_PAAS_HOME>/source
/extensions/cep/artifacts/stream_definitions
directory to<CEP_HOME>/repository/conf
directory. Where/
<PRIVATE_PAAS_HOME>
refers to the root of the repository. Replace the content in the
jndi.properties
file, which is in the<CEP_HOME>/repository/conf/
directory, with the following configurations. Update themessage-broker-ip
andmessage-broker-port
values.# register some connection factories # connectionfactory.[jndiname]=[ConnectionURL] connectionfactoryName=TopicConnectionFactory java.naming.provider.url=tcp://[MB_IP]:[MB_Port] java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory # register some topics in JNDI using the form # topic.[jndiName]=[physicalName] topic.lb-stats=lb-stats topic.instance-stats=instance-stats topic.summarized-health-stats=summarized-health-stats
Add the following content to the
siddhi.extension
file, which is in the<CEP_HOME>/repository/conf/siddhi/
directory.org.apache.stratos.cep.extension.GradientFinderWindowProcessor org.apache.stratos.cep.extension.SecondDerivativeFinderWindowProcessor org.apache.stratos.cep.extension.FaultHandlingWindowProcessor
- Build the project in the
<PRIVATE_PAAS_HOME>/source
/extensions/cep/stratos-cep-extension/
directory. Thereafter, copy theorg.apache.stratos.cep.extension-4.0.0.jar
file that can be found in the<PRIVATE_PAAS_HOME>/source/extensions/cep/stratos-cep-extension/target
directory, to the<CEP_HOME>/repository/components/lib/
directory. Download any dependency on 5.9.1 or any latest stable ActiveMQ TAR file from https://activemq.apache.org/download.html. The folder path of this file will be referred to as
<ACTIVEMQ_HOME>
. Copy the following ActiveMQ client JARSs from <ACTIVEMQ_HOME>
/lib/
directory to the<CEP_HOME>/repository/components/lib/
directory.
activemq-broker-5.9.1.jar
activemq-client-5.9.1.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
hawtbuf-1.9.jar
- Copy the following files from the
<PRIVATE_PAAS_HOME>/extensions/cep/artifacts/eventbuilders/
directory to the<CEP_HOME>/repository/deployment/server/eventbuilders/
directory:HealthStatisticsEventBuilder.xml
InstanceStatisticsEventBuilder.xml
LoadBalancerStatisticsEventBuilder.xml
- Copy the following file from
<PRIVATE_PAAS_HOME>/extensions/cep/artifacts/inputeventadaptors/
directory to the<CEP_HOME>/repository/deployment/server/inputeventadaptors/
directory:
DefaultWSO2EventInputAdaptor.xml - Copy the following files from the
<PRIVATE_PAAS_HOME>/extensions/cep/artifacts/outputeventadaptors/
directory to the<CEP_HOME>/repository/deployment/server/outputeventadaptors/
directory:DefaultWSO2EventOutputAdaptor.xml
JMSOutputAdaptor.xml
Update the
MB_HOSTNAME
andMB_LISTEN_PORT
with relevant values in theJMSOutputAdaptor.xml
file that was copied in the above step, as follows:property name="java.naming.provider.url">tcp://MB_HOSTNAME:MB_LISTEN_PORT</property>
- Copy the following files from the
<PRIVATE_PAAS_HOME>/extensions/cep/artifacts/executionplans/
directory to the<CEP_HOME>/repository/deployment/server/executionplans/
directory:AverageHeathRequest.xml
AverageInFlightRequestsFinder.xml
GradientOfHealthRequest.xml
GradientOfRequestsInFlightFinder.xml
SecondDerivativeOfHealthRequest.xml
SecondDerivativeOfRequestsInFlightFinder.xml
- Copy the following files from the
<PRIVATE_PAAS_HOME>/extensions/cep/artifacts/eventformatters/
directory to the<CEP_HOME>/repository/deployment/server/eventformatters/
directory:AverageInFlightRequestsEventFormatter.xml
AverageLoadAverageEventFormatter.xml
AverageMemoryConsumptionEventFormatter.xml
FaultMessageEventFormatter.xml
GradientInFlightRequestsEventFormatter.xml
GradientLoadAverageEventFormatter.xml
GradientMemoryConsumptionEventFormatter.xml
MemberAverageLoadAverageEventFormatter.xml
MemberAverageMemoryConsumptionEventFormatter.xml
MemberGradientLoadAverageEventFormatter.xml
MemberGradientMemoryConsumptionEventFormatter.xml
MemberSecondDerivativeLoadAverageEventFormatter.xml
MemberSecondDerivativeMemoryConsumptionEventFormatter.xml
SecondDerivativeInFlightRequestsEventFormatter.xml
SecondDerivativeLoadAverageEventFormatter.xml
SecondDerivativeMemoryConsumptionEventFormatter.xml