Hi Imesh,

Just a suggestion.
We recently added the support for AMQP transport for ESB based on RabbitMQ
Java Client [1]. So if it helps, you can take a look at that too as an
option, when you start writing this adaptor.

Thanks,
Kishanthan.
[1] http://www.rabbitmq.com/api-guide.html



On Sun, Dec 22, 2013 at 5:00 PM, Imesh Gunaratne <[email protected]> wrote:

> Hi,
>
> Thanks Lasantha for your feedback.
>
> No, there won't be any processing happening in CEP based on the AMQP
> properties. The idea is to support the AMQP protocol when writing from CEP
> to the message consumer. As a result AMQP properties could be included in
> messages using event formatters.
>
> Nirmal, the reason why I proposed to implement a new adapter is that JMS
> and AMQP would mean two different things (as you have mentioned) in the
> context of messaging:
>
>    - JMS is a standard* messaging API for Java platform*
>    - AMQP is a specification which provides a *standard messaging
>    protocol across all platforms*.
>
> Therefore I think an AMQP Output Adapter would provide a much clear view
> and add more value to CEP when communicating with AMQP based, non Java
> message consumers.
>
> Yes as I have pointed out earlier the idea is to implement the AMQP Output
> Adapter by re-using the features in JMS Output Adapter.
>
> Thanks
>
>
>
> On Sun, Dec 22, 2013 at 1:18 PM, Lasantha Fernando <[email protected]>wrote:
>
>> Hi Imesh,
>>
>> +1 for implementing an AMQP output adapter. I think it will be very
>> useful to add it as a supported adapter type for CEP.
>>
>> Will there be any processing happening based on the AMQP properties
>> within the CEP? Or is it simply that an AMQP message needs to be sent with
>> properties to the AMQP based broker?
>>
>> Thanks,
>> Lasantha
>>
>>
>> On 22 December 2013 10:34, Imesh Gunaratne <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> In Apache Stratos (incubating) 4.0.0 we are using WSO2 CEP for
>>> aggregating statistics events sent by load balancers and cartridge agents
>>> (agents in VM instances). The aggregated values are used by the Autoscaler
>>> for taking autoscaling decisions.
>>>
>>> Here the events are sent to CEP using the default input adapter (via
>>> Thrift) and the aggregated events are sent to an AMQP based message broker
>>> using the JMS Output Adapter. Event formatters have been used for defining
>>> the formats of the output messages.
>>>
>>> *A Sample Event Formatter:*
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <eventFormatter name="AverageRequestsInflightEventFormatter"
>>>   statistics="disable" trace="enable" xmlns="
>>> http://wso2.org/carbon/eventformatter";>
>>>   <from streamName="average_in_flight_requests" version="1.0.0"/>
>>>   <mapping customMapping="enable" type="json">
>>>
>>> <inline>{"average_in_flight_requests":{"cluster_id":"{{cluster_id}}","network_partition_id":"{{network_partition_id}}","value":"{{count}}"}}</inline>
>>>   </mapping>
>>>   <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
>>>     <property
>>> name="transport.jms.Destination">summarized-health-stats</property>
>>>   </to>
>>> </eventFormatter>
>>>
>>> The above is a sample event formatter which defines an aggregated event.
>>> Similarly there is a collection of events sent by CEP to the message
>>> broker. For each event there is an event formatter defined.
>>>
>>>
>>> *The Requirement:*
>>> Here there is a requirement to include a set of AMQP Properties [1] in
>>> the output message. These properties may include name value pairs specific
>>> for each event:
>>>
>>> *A Sample AMQP Message*
>>> Message Properties:
>>>
>>> event_class_name: 
>>> org.apache.stratos.messaging.event.health.stat.AverageInFlightRequests
>>>
>>> Message Body:
>>>
>>> {"average_in_flight_requests":{"cluster_id":"{{cluster_id}}","network_partition_id":"{{network_partition_id}}","value":"{{count}}"}}
>>>
>>>
>>> *The Proposal:*
>>> As I understood this functionality is not supported by the JMS Output
>>> Adapter at the moment and I think it's logical since AMQP features should
>>> not be included in JMS Output Adapter.
>>>
>>> As a solution to this requirement I would like to implement an AMQP
>>> Output Adapter on top of the JMS Output Adapter to support this
>>> functionality [2]. I will send more implementation design details in
>>> another mail as I progress.
>>>
>>> Really appreciate your thoughts on this.
>>>
>>> [1]
>>> http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Message_format
>>> [2] http://docs.wso2.org/display/CEP300/Output+Event+Adaptors
>>>
>>>
>>> Many Thanks
>>> --
>>> *Imesh Gunaratne*
>>> Technical Lead
>>> WSO2 Inc: http://wso2.com
>>> T: +94 11 214 5345 M: +94 77 374 2057
>>> W: http://imesh.gunaratne.org
>>> Lean . Enterprise . Middleware
>>>
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> [email protected]
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>>
>> --
>> *Lasantha Fernando*
>> Software Engineer - Data Technologies Team
>> WSO2 Inc. http://wso2.com
>>
>> email: [email protected]
>> mobile: (+94) 71 5247551
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> *Imesh Gunaratne*
> Technical Lead
> WSO2 Inc: http://wso2.com
> T: +94 11 214 5345 M: +94 77 374 2057
> W: http://imesh.gunaratne.org
> Lean . Enterprise . Middleware
>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
*Kishanthan Thangarajah*
Senior Software Engineer,
Platform Technologies Team,
WSO2, Inc.
lean.enterprise.middleware

Mobile - +94773426635
Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to