Good day everyone.
1) I have a simple app which creates JMSProducer, ActiveMQ Query and send some messages to query.
2) I also have the application which is a subscriber of ActiveMQ Query (it receives messages from application above).
This is the situation:
I create another server config to my subscriber-App, and launch it twice at a time on different ports. (for example: subscriber-App1 started at jetty-http-port-9998/jetty-ssl-port-9994; subscriber-App2 started at jetty-http-port-9999/jetty-ssl-port-9995).
I open subscriber-App1 console and subscriber-App2 console at Intellij IDEa and begin to send messages by producer-App. And I see that subscribers takes messages by rotation: when I send it the first time - subscriber1 takes it; 2nd time - subscriber2; 3rd time - subscriber1 etc.
The question is: how can I configure subscriber-Application to give it exclusive access to data? The main condition is: if there is the one Subscriber of my Queue - another applications can't receive messages from Queue. And if I launch two subscriberApps on different ports - all messages will be received by only one of them.
Thank you in advance!