Apama Documentation : Developing Apama Applications : Developing Apama Applications in EPL : Defining Event Listeners : Out of band connection notifications
Out of band connection notifications
 
Out of band notification events
Enabling out of band notifications
Apama applications running in the correlator can make use of Apama out of band notifications. Out of band notifications are events that are automatically sent to all public contexts in a correlator whenever any component (an IAF adapter, dashboard, another correlator, or a client built using the Apama SDKs) connects or disconnects from the correlator.
For example, consider an environment where correlator A and correlator B both have out of band notifications enabled and are connected so that events from correlator A are sent to correlator B. In this case, correlator A will receive a ReceiverConnected event and correlator B will receive a SenderConnected event. The Apama application running in correlator A and B can listen for those events and execute some application logic. Note that clients such as dashboards and IAF adapters typically connect as both receiver and a sender together and, therefore, two events would be sent in quick succession.
Out of band events are defined in the com.apama.oob package and consist of:
*ReceiverConnected
*SenderConnected
*ReceiverDisconnected
*SenderDisconnected
The ReceiverConnected and SenderConnected events contain the name of the component that is connecting. When correlators and IAF adapters send a notification event, the format of the string that contains the component name is as follows:
"name (on port port_number)"
The name is the name that was specified when the component was started. For correlators and IAF adapters, you can specify a name with the --name option when you start the component. The name defaults to correlator or iaf according to the type of component. The port_number is the port that the connecting receiver or sender is running on.
Out of band events make it possible for developers of Apama components to add appropriate actions for the component to take when it receives notice that another component of interest has connected or disconnected. For example, an adapter can cancel outstanding orders or send a notification to an external system.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback