com.apama.correlator.jms
Event JMSReceiver


An event object representing an existing JMS receiver.

A receiver listeners for messages on a specific JMS queue or topic, maps them to Apama events and sends them to the Correlator's public contexts.
Action summary
 voidappControlledAcknowledgeAndResume()

Signals that the application is ready for messages received since the last appControlledAcknowledgeAndResume() call to be acknowledged to JMS, and that message receiving can then resume.
 stringgetReceiverId()

Returns the unique identifier of this receiver.
 voidremove()

Requests removal of this JMS receiver.
 
Action detail

appControlledAcknowledgeAndResume

            void appControlledAcknowledgeAndResume()
        
Signals that the application is ready for messages received since the last appControlledAcknowledgeAndResume() call to be acknowledged to JMS, and that message receiving can then resume.

This is used only by receivers which are running in APP_CONTROLLED reliability mode. APP_CONTROLLED receivers should listen for the JMSAppControlledReceivingSuspended event sent at the end of each batch of incoming messages and respond by calling appControlledAcknowledgeAndResume() once the messages or the output events/state changes resulting from processing them have been reliably stored in another system (e.g. sent and flushed to a downstream JMS destination, or committed to a database or distributed MemoryStore).

To avoid race conditions, it is important to call this method only from the context that is handling both the JMS messages from this receiver and the JMSAppControlledReceivingSuspended event.

Never call this method except in response to a JMSAppControlledReceivingSuspended event, and do not call it from a persistent monitor - both will result in an exception.
See Also:
com.apama.correlator.jms.JMSAppControlledReceivingSuspended - 

getReceiverId

            string getReceiverId()
        
Returns the unique identifier of this receiver.

remove

            void remove()
        
Requests removal of this JMS receiver.

The removal will be performed asynchronously, and completes after all events already received from this JMS destination have been sent to the Correlator, any persisted uniqueMessageIds no longer required for duplicate detection have been deleted, any durable topic subscription has been removed from the JMS broker, and the associated JMS consumer and session have been closed.

EPL applications may listen for the REMOVED JMSReceiverStatus 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 receiver.

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