Hello
Well, it is very embarrasing, but , I realized what I was doing wrong : 

In the  consumer, I created the session BEFORE start the connection .
In Java code : 
    connectionFactory factory = new ActiveMQConnectionFactory(brokerURL);
    connection = factory.createConnection();
    connection.setClientID(clientId);
    
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

    // create topic, etc 
   
   connection.start();

Then , I realized that it should be : 
    connectionFactory factory = new ActiveMQConnectionFactory(brokerURL);
    connection = factory.createConnection();
    connection.setClientID(clientId);
    connection.start();
  
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

    // create topic, etc 
  
Now, it works properly .
I hope that my mess can help others.

Thank you very much all  




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Configuration-Shared-Master-Slave-and-some-questions-tp4301080p4311253.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to