Broker URL
failover:(tcp://broker1:61616,tcp://broker2:61616)?randomize=false&jms.useAsyncSend=false&jms.dispatchAsync=false&maxReconnectAttempts=2&maxReconnectDelay=100
I register a message listener on the active broker:
Destination destQueue = new ActiveMQQueue("queue");
MessageConsumer messageConsumer = session.createConsumer(destQueue);
messageConsumer.setMessageListener(consumer);
During a failover the consumer disapears and is not re-registered on the second broker. Can you give me some light how could I register the listener on the other broker automatically upon failover?
thanks in advance
Found out - the problem was because I used PooledConnectionFactory for listener's code. Replaced with ActiveMQConnectionsFactory and it worked.