Hi Pandula,

This is because the in Data Agents, we define the stream once and after
that we publish events for the data stream. Before sending each event, we
can't check whether the stream is defined because it's expensive call and
we'll penalize the performance.

Actually it's not recommended to stop the BAM and start new BAM without
carrying forward any of the meta information. In BAM 2.4.0 we store the
stream definition meta information also in cassandra META_KS keyspace,
hence when these meta information is lost, it won't work. If you need to
clear your data you can only remove EVENT_KS keyspace.

In BAM 2.4.1 M2 onwards the stream definition store will be moved to
registry, hence you can swipe your cassandra data completely, but you need
to point to same registry db which was used by the previous BAM instance to
avoid this problem.

But in such cases where you have lost your meta information, you can update
your data agent configuration without restarting the AS/ESB server, which
will recreate the data publisher and solve the problem.

Thanks,
Sinthuja.


On Mon, Mar 3, 2014 at 11:52 AM, Pandula Kariyawasam <[email protected]>wrote:

>
> Hi All,
>
> We have faced following issue, which is common for all the Data Agents,
> such as 'Mediation Data Agent' in ESB, and 'Service Statistics Data Agent'
> in AS.
>
> Following scenario is what we have done.
> - Host 'SimpleStockQuote' sample in AS421
> - Create a Pass through proxy in ESB481 which is pointed to
> 'SimpleStockQuote' sample in AS.
> - Start a BAM241 with offset 0
> - Enable 'Mediation Data Agent' in ESB pointed to BAM
> - Enable 'Service Statistics Data Agent' in AS pointed to BAM
> - Make a request to the proxy (via Tryit or SoapUI)
> - The above request will make the related Streams on Cassandra in BAM
> - Now stop the BAM.
> - Extract a fresh BAM pack and start with offset 0
> - Make another request to the proxy.
> - In this situation, any of the Data Agents won't try to make the related
> Streams on Cassandra in BAM. BAM will print following Error on backend [1].
> - Now, try to do the same, after restarting the ESB & AS. Now the Streams
> will get created without a problem.
>
> This is happening due to caching on data agents in ESB & AS.
>
> The same behavior can expect if we clean all the DBs on BAM.
>
> WDYT ?
>
>
>
> [1]
>
> [2014-03-02 15:28:15,866] ERROR
> {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} -  Wrongly
> formatted event sent for carbon.super
> org.wso2.carbon.databridge.core.exception.EventConversionException: Error
> when converting bam_service_data_publisher:1.0.0 of event bundle with
> events 1
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:126)
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:88)
>     at
> org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:72)
>     at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>     at java.lang.Thread.run(Thread.java:662)
> Caused by:
> org.wso2.carbon.databridge.core.exception.EventConversionException: No
> StreamDefinition for streamId bam_service_data_publisher:1.0.0 present in
> cache
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:112)
>     ... 8 more
> [2014-03-02 15:28:16,661] ERROR
> {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} -  Wrongly
> formatted event sent for carbon.super
> org.wso2.carbon.databridge.core.exception.EventConversionException: Error
> when converting bam_mediation_stats_data_publisher:1.0.1 of event bundle
> with events 1
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:126)
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:88)
>     at
> org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:72)
>     at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>     at java.lang.Thread.run(Thread.java:662)
> Caused by:
> org.wso2.carbon.databridge.core.exception.EventConversionException: No
> StreamDefinition for streamId bam_mediation_stats_data_publisher:1.0.1
> present in cache
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:112)
>     ... 8 more
> [2014-03-02 15:28:16,661] ERROR
> {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} -  Wrongly
> formatted event sent for carbon.super
> org.wso2.carbon.databridge.core.exception.EventConversionException: Error
> when converting bam_mediation_stats_data_publisher:1.0.1 of event bundle
> with events 1
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:126)
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:88)
>     at
> org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:72)
>     at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>     at java.lang.Thread.run(Thread.java:662)
> Caused by:
> org.wso2.carbon.databridge.core.exception.EventConversionException: No
> StreamDefinition for streamId bam_mediation_stats_data_publisher:1.0.1
> present in cache
>     at
> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:112)
>     ... 8 more
>
>
>
>
> --
>
> *Pandula Kariyawasam K.B. *
> *Senior Software Engineer - QA*
> Mobile: +94772314510
>
> <http://www.wso2.com>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Sinthuja Rajendran*
Software Engineer <http://wso2.com/>
WSO2, Inc.:http://wso2.com

Blog: http://sinthu-rajan.blogspot.com/
Mobile: +94774273955
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to