Let's start from the base that queus do not have any type of pre-assignment
Introduction to Apache ActiveMQ
You'll see what he says
Our consumer will process all the messages that are in the queue "on demand" (when it is executed). If we wanted to process each message when it reaches the queue (this is not our case) we should implement the javax.jms.MessageListener interface and launch our process as a thread that is waiting (Thread).
I understand you are not using java, but the equivalent in c # would be the
Asynchronous
assigning an event in Listener
using(IMessageConsumer consumer = session.CreateConsumer(destination))
using(IMessageProducer producer = session.CreateProducer(destination))
{
// Start the connection so that messages will be processed.
connection.Start();
producer.Persistent = true;
producer.RequestTimeout = receiveTimeout;
consumer.Listener += new MessageListener(OnMessage);
//resto codigo
The issue is that in your case you will have two consumers with which you require a load balancing that allows you to distribute the messages
Maybe you should evaluate
Clustering