2 Replies Latest reply on May 28, 2014 6:34 AM by Christiaan van Tienhoven

    JMSManagement - setExpiryAddress and setDeadLetterAddress ignore queue address?

    Christiaan van Tienhoven Newbie

      Hey guys,


      I hope you can help me out, I tried the search function but didn't really come across an answer. I try to set the expiry address and the deadletter adddress via de management API using the JMS management queue. What I do is the following:


      session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      QueueRequestor requestor = new QueueRequestor(session, managementQueue);
      Message m = session.createMessage();
      JMSManagementHelper.putOperationInvocation(m, "jms.queue." + queue, "setExpiryAddress", "jms.queue." + queue + "_EXPIRY");
      Message reply = requestor.request(m);
      System.out.println("setExpiryAddress success: " + JMSManagementHelper.hasOperationSucceeded(reply));



      "jms.queue." + queue is the address of the queue that should be altered, "jms.queue." + queue + "_EXPIRY" is the expiry address that should be set. All queues exist.


      JMSManagementHelper.hasOperationSucceeded(reply) returns true, so all's fine. I'd expect that only the specified queue is altered.  However, what this actually does is alter the expiry address for all queues deployed on the server. I tested this on HornetQ 2.4.0 and HornetQ 2.3.0. Same goes for the method setDeadLetterAddress. Am I overlooking something here?