So the question is how to temporarily stop and start the jms listener created using spring using the following method:
<amq:connectionFactory id="exampleJmsFactory" brokerURL="tcp://${jms.broker.url}" />
<jms:listener-container concurrency="1" connection-factory="exampleJmsFactory" destination-type="queue" message-converter="exampleMessageConverter">
<jms:listener destination="incoming.example.client.queue" ref="exampleProductsMessageConsumer" method="consume"/>
</jms:listener-container>
<bean id="exampleProductsMessageConsumer" class="com.unic.example.jms.receive.JmsExampleProductsMessageConsumer" scope="tenant"/>
So basically what the problem is. We have an init / update mechanism that the client can run at any time and delay this init / update. I want to stop using ANY messages, because at this time the system is unusable, and if the message arrives, it will be lost.
So, how can I stop the listener or listener container or the entire connection using the API. I found that the AbstractJmsListeningContainer class is stopping / starting, but how can I get it? I mean, none of these jms: listener and listener-container have a name or anything like that.