title: How to get the message from temporary Queue in Different session
body: <p>i am new to jms and activemq. i produce one message to one static queue in activemq and  get  reply back to temporary queue using getJMSReplyTo. the code is following </p>
  
  <pre><code>ActiveMQConnectionFactory connectionFactory = new  ActiveMQConnectionFactory("tcp://localhost:61616");
  
      // Create a Connection
      Connection connection = connectionFactory.createConnection();
      connection.start();
  
      // Create a Session
      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
  
  
      // Create the destination (Topic or Queue)
      Destination destination = (Destination)   session.createQueue("PostWithParameter_Queue");
  
      // Create a MessageConsumer from the Session to the Topic or Queue
      MessageConsumer consumer = session.createConsumer(destination);
      //consumer.setMessageListener(new StaticQueueListener());
      // Wait for a message
      Message message = (Message) consumer.receive();
      MessageConsumer consumer1 = session.createConsumer(message.getJMSReplyTo());
      consumer1.setMessageListener(new ReplyHandler()); 
      consumer.close();
      session.close();
  </code></pre>
  
  <p>My Reply Handler follows</p>
  
  <pre><code>@Override
  public void onMessage(Message message) {
  
      try
      {
  
          System.out.println(message.getStringProperty("status"));
      }
      catch (JMSException e) 
      {
              e.printStackTrace();
      }
  }  
  </code></pre>
  
  <p>Now i am getting the result from temporary queue. because its in the same session.
  my question is i want to get the message from temporary queue  in differesnt session using temporary queue name. if i want to get the message from temporary queue in different client  using temporary queue name how i will do that ? . </p>