0

I have configured a Stream with WSO2Event Adaptor in CEP:

<?xml version="1.0" encoding="UTF-8"?>
<inputEventAdaptor name="CEP_test_input_adapter" statistics="disable" trace="disable" type="wso2event" xmlns="http://wso2.org/carbon/eventadaptormanager"/>

with Event builder:

<?xml version="1.0" encoding="UTF-8"?>
<eventBuilder name="CEP_test_builder" statistics="enable" trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="CEP_test_input_adapter" eventAdaptorType="wso2event">
    <property name="stream">CEP_test_stream2</property>
    <property name="version">1.0.0</property>
</from>
<mapping customMapping="disable" type="wso2event"/>
<to streamName="CEP_test_stream2" version="1.0.0"/>
</eventBuilder>

with Stream def:

{
  "name": "CEP_test_stream2",
  "version": "1.0.0",
  "nickName": "CEP_test2",
  "description": "CEP_test2",
  "metaData": [
    {
      "name": "tenant_id",
      "type": "INT"
    },
    {
      "name": "http_method",
      "type": "STRING"
    },
    {
      "name": "character_set_encoding",
      "type": "STRING"
    },
    {
      "name": "remote_address",
      "type": "STRING"
    },
    {
      "name": "transport_in_url",
      "type": "STRING"
    },
    {
      "name": "message_type",
      "type": "STRING"
    },
    {
      "name": "remote_host",
      "type": "STRING"
    },
    {
      "name": "service_prefix",
      "type": "STRING"
    },
    {
      "name": "host",
      "type": "STRING"
    }
  ],
  "correlationData": [
    {
      "name": "activity_id",
      "type": "STRING"
    }
  ],
  "payloadData": [
    {
      "name": "message_direction",
      "type": "STRING"
    },
    {
      "name": "service_name",
      "type": "STRING"
    },
    {
      "name": "operation_name",
      "type": "STRING"
    },
    {
      "name": "message_id",
      "type": "STRING"
    },
    {
      "name": "timestamp",
      "type": "LONG"
    },
    {
      "name": "t1",
      "type": "STRING"
    },
    {
      "name": "t2",
      "type": "STRING"
    },
    {
      "name": "t3",
      "type": "STRING"
    }
  ]
}

When I try it via "Event Simulator" it goes through CEP OK but when I try to send event via ESB nothing happens on CEP:

I've configured ESB BAM Profile for my CEP with dump headers dump body and attributes t1,t2,t3 (same def as in CEP). Connection is OK because when I clik "test server" pop ups "Successfully connected to BAM Server."

I've added to my sequence in proxy Agent:

<bam>
    <serverProfile name="CEP_test">
        <streamConfig name="CEP_test_stream2" version="1.0.0"/>
    </serverProfile>
</bam>

After trying proxy I have in log result:

TID: [0] [ESB] [2014-07-12 11:47:24,126]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  CEP: = BEFORE BAM PROFILE {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [ESB] [2014-07-12 11:47:24,136]  INFO {org.wso2.carbon.mediator.bam.Stream} -  Data Publisher Created. {org.wso2.carbon.mediator.bam.Stream}
TID: [0] [ESB] [2014-07-12 11:47:24,255]  INFO {org.apache.synapse.mediators.builtin.LogMediator} -  CEP: = AFTER BAM PROFILE {org.apache.synapse.mediators.builtin.LogMediator}

But no Event in CEP, why? Any ideas? What have i done wrong? Thanks for any help!:)

Community
  • 1
  • 1
peter
  • 1
  • 1
  • Have you tried enabling event tracing for CEP input adaptor? You can enable event tracing for the adaptor to assert that the event comes to CEP. If it comes to input adaptor, you can enable tracing on event builder, execution plan, event formatter and so on to determine where the event is getting dropped. Also, the first time events are published from ESB to CEP, you should see a log message like below at CEP console. INFO - {DataBridge} user admin connected – lasantha Oct 06 '14 at 12:22
  • I know that this post is from 2014 but if you don't fix it, please write your BAM configuration (attributes/names/etc) from ESB. – Kacu May 08 '15 at 08:51

0 Answers0