receiving flow events in JMS
We use FlowEventHandler to confirm if we are successfully subscribed to a queue.(We use these for Fault tolerance). Is there a way to get these events in JMS ?
public class CustomFlowEventHandler implements FlowEventHandler { public void handleEvent(Object o, FlowEventArgs flowEventArgs) { if(flowEventArgs.getEvent() == FlowEvent.FLOW_ACTIVE) { LOG.info("******Queue subscribed successfully *****"); // Do stuff } else if(flowEventArgs.getEvent() == FlowEvent.FLOW_INACTIVE) { LOG.info("******Queue unsubscribed probably because of a network disconnect *****"); // Do stuff } else { LOG.warn("***********Invalid Flow Event Received*********"); } }
}
Comments
-
@alinaqvi there is a way to expose this event (
ActiveFlowIndicationEvent
) in Solace JMS. Note that this is a Solace extension to JMS as there is no flow indication event in standard JMS.
The docs page that talks about this is here: https://docs.solace.com/Solace-JMS-API/Creating-Message-Consume.htm#receiving_messages_3569307012_306598
The sample that shows this is:SolJMSActiveFlowIndication.java
which is found in thesamples
folder of the Solace JMS distribution. If you obtained Solace JMS via Maven repository, you may not have the full distribution. It can be downloaded here: https://products.solace.com/download/JMS_API
I hope that helps.1