Hi,

For BAM notification, the approach we have at the moment is, using CEP,
which we do ship by default with BAM now. But, there is another limitation,
where we cannot trigger any notifications from Hive scripts, which is what
is used mostly.

So the requirement is, somehow, we should be able to send messages from
Hive to a stream to send out notifications, that is, when messages comes to
a stream, we can use (CEPs) message builder/formatters to send out
email/sms etc.. So I've implemented a simple mechanism to do this, where
when Hive wants to send out a message to a stream, it will write a data row
to a pre-defined Cassandra CF ("bam_notification_messages"), where it will
have a column with the name "streamId", and other columns (maps to
"payload" section of a stream). And then, in the BAM server, there is a
scheduled task running, where it polls the data in that CF (5 second
intervals), to get the existing rows, and reads the streamId and other
columns to generate an event to be send to the target stream, and processed
rows will be deleted. So with this approach, effectively, we can now send
events to a specific stream from Hive.

I've tested this feature in BAM. And hope this approach is fine for the
requirement.

Cheers,
Anjana.

-- 
*Anjana Fernando*
Technical Lead
WSO2 Inc. | http://wso2.com
lean . enterprise . middleware
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to