4 Replies Latest reply on Sep 5, 2011 8:13 AM by gargkshitiz

    programmatic queue creation

    gargkshitiz

      Hi,

       

      I want to programmatically create queue like this:

       

      // create durable queue

      clientSession.createQueue(receiverQueue, receiverQueue, true);

       

       

      it's throwing HornetQException. How do we know that this exception is due to already existing queue or some other reason.

       

      My goal is to consume/avoid exception in case the queue is already existing.

       

      I saw deployQueue method but that's in management API. How can I use that instead of creating queue using clientSession?