com.apama.correlator.jms
Event JMSSender


An event object representing an existing JMS sender.

A sender can be used to handle emitted Apama events to a Correlator channel, mapping them to JMS messages using the requested message reliability setting and sending them to any destination on the JMS message bus.
Action Summary
 stringgetChannel()

Returns the Correlator channel to use for emitting events that should be sent to JMS using this sender.
 integergetOutstandingEvents()

Returns the number of events that have been emitted to this sender from EPL, but are still queued waiting to be sent to JMS.
 stringgetSenderId()

Returns the unique identifier of this sender.
 voidremove()

Requests removal of this JMS sender. The removal will be performed asynchronously, and completes after all events already emitted from this context have been passed to JMS, and the associated JMS producer and session have been closed.
 
Action Detail

getChannel

string getChannel()
Returns the Correlator channel to use for emitting events that should be sent to JMS using this sender.

Note that if this senderId does not exist or has been removed then events sent to this channel will be lost without a warning.

getOutstandingEvents

integer getOutstandingEvents()
Returns the number of events that have been emitted to this sender from EPL, but are still queued waiting to be sent to JMS.

This allows an EPL application to throttle or reduce the rate at which it sends events based on the size of the backlog building up in the Correlator's queues, to ensure that the Correlator does not run out of memory due to a temporary peak in throughput rate or loss of the JMS connection.

Calling this action is a slightly expensive operation, so it is best to get the number of outstanding events once, then loop sending a batch of events. Therefore do not call getOutstandingEvents inside a loop that is continually sending events to JMS.

You must not call this method after calling remove().

getSenderId

string getSenderId()
Returns the unique identifier of this sender.

remove

void remove()
Requests removal of this JMS sender. The removal will be performed asynchronously, and completes after all events already emitted from this context have been passed to JMS, and the associated JMS producer and session have been closed.

EPL applications may listen for the REMOVED JMSSenderStatus event to detect when the removal has completed.

If the connection is currently down there could be an unbounded delay in completing the removal of the sender. The application should not emit any more events to the sender once this action has been called.

It is an error to attempt to remove a JMS sender that does not exist, or to attempt to remove a static JMS sender. Such errors will result in the termination of the current EPL monitor instance.
See Also:
com.apama.correlator.jms.JMSSenderStatus#REMOVED -