Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Creates <CEP_HOME>/repository/conf/stream-manager-config.xml file, which is used to create the stream definitions for the sample.

Executing the sample

...

  1. Open a terminal, go to kafka server home directory and create necessary topics.

    Info

    bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic sensorStream
    bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic filteredSensorStream 

  2. Open another terminal, go to kafka server home directory and run below command to consume message which coming from CEP (kafka output adaptor).
    Info

    bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic filteredSensorStream --from-beginning

    Open another terminal, go to <CEP_HOME>/samples/producers/sensor-stats and run ant command. It send some xml events to CEP server to kafka input event adaptor.Run the axis2 LogService since it is the consumer of the events which emitted by CEP. Go to the <CEP_HOME>/samples/LogService and run ant -DsampleNo=0111. Then it will deploy the logging service.

  3. Go to the management console and select the Try this service option .

    Image Added

  4. Then you will redirected to a UI shown below, then change the endpoint and body as shown below and click on send.

    Image Added 

    Endpoint - http://10.100.0.44:9763/services/soapInputEventAdaptor/apiRequestStream
    Body - 

    Code Block
    <body>
    <events>
        <event>
            <metaData>
                <api>API-1</api>
                <api_version>version</api_version>
            </metaData>
            <payloadData>
                <requestTime>56783</requestTime>
                <apiPublisher>publisher1</apiPublisher>
                <hostName>localhost</hostName>
            </payloadData>
        </event>
    </events>
    </body>
  5. From the terminal opened in step 2, you can the processed events which emitted by CEP.

    For example, given below is part of the console output of the consumer when sending events from the producer.

    Image Removed

...

  1. through Try-it service. 

    Image Added