Search code examples
jmsapama

Apama JMS Correlator Adapter dynamic flow control


Is there way in Apama to dynamically stop/start the JMSConsumer as part of the JMS adapter?


Solution

  • yes there are actually two ways you could achieve this:

    a) you could do it by removing/re-adding the receiver/consumer, which is supported by our EPL API. For a queue that would have identical semantics to the stop/start concept you mentioned, whereas for a topic you'd miss out on messages sent during the period between stopping and restarting.

    b) use the receiver flow control feature http://www.apamacommunity.com/documents/10.3.0.1/apama_10.3.0.1_webhelp/apama-webhelp/index.html#page/apama-webhelp%2Fco-DepAndManApaApp_receiver_flow_control.html which might give you a more efficient way to solve it if flow control is the goal, i.e. reducing or pausing the receiving if for some reason (too many operations in progress, failure of some downstream component or database needed to make progress) you're not ready to process more incoming messages currently. As mentioned in that doc topioc, there’s a sample that shows how to do it in EPL so it should be really easy to get started.