Apama Documentation : Connecting Apama Applications to External Components : Working with Connectivity Plug-ins : Deploying connectivity plug-ins : Sending and receiving events with connectivity plug-ins
Sending and receiving events with connectivity plug-ins
When the correlator starts up, any connectivity chains listed in the configuration file are loaded and started. At this point, events may be sent from EPL to the chains, through all of the codecs towards the transport.
While the transport is able to send events towards the host (the correlator), the correlator does not process those events immediately. This prevents problems with events that are sent from the transport to the correlator before the correlator has had event definitions injected, or the EPL to handle those events has been injected or is ready to process the events. Instead, these events are queued in the correlator.
An EPL application that sends or receives events to a transport should call the onApplicationInitialized method on the com.softwareag.connectivity.ConnectivityPlugins EPL object. This notifies the correlator that the application is ready to process events. Any events that the transport sends towards the host (correlator) before this is called are then delivered to the correlator. Events from a transport are maintained in the correct order.
Calling onApplicationInitialized notifies all codecs and transports that the host is ready by calling the hostReady method. The transport may choose not to receive events (for example, from a JMS topic) until the application is ready if doing so may have adverse effects.
To aid diagnosing problems when part of the system is not ready in a timely manner, the correlator logs this on every Status: log line (by default, every 5 seconds). For example:
Application has not called onApplicationInitialized yet - 500 events from connectivity transports will not be processed yet
If EPL has not yet called onApplicationInitialized or if a plug-in in myChain has not returned from hostReady yet, the following is logged:
Chain myChain is handling hostReady call
Calling ConnectivityPlugins.onApplicationInitialized also notifies the correlator-integrated messaging for JMS, if enabled, that it is ready to receive events. It will then implicitly perform the JMS.onApplicationInitialized() call (see Using EPL to send and receive JMS messages). You should only call ConnectivityPlugins.onApplicationInitialized() once the application is ready to receive all incoming events, either from connectivity chains or JMS.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback