title: JMS message flow between Sender/Receiver
body: <p>If I use the following code to create a sender and receiver </p>
  
  <pre><code>qsender = qsession.createSender((Queue)msg.getJMSDestination());
  qreceiver=qsession.createReceiver((Queue)msg.getJMSDestination());
  </code></pre>
  
  <p>and then do this</p>
  
  <pre><code>qsender.send(msg);
  </code></pre>
  
  <p>Does it just send the message to the queue and will it remain in the queue forever? Do I need to call the receive() method on the receiver or implement the MessageListener interface to get it to the receiver?</p>
  
  <p>Edit: more info</p>
  
  <pre><code>qsender = qsession.createSender((Queue)msg.getJMSDestination());
  qreceiver=qsession.createReceiver((Queue)msg.getJMSDestination());
  
  temp1 = qsession.createTemporaryQueue();
  responseConsumer = qsession.createConsumer(temp1);
  msg.setJMSReplyTo(temp1);
  
  responseConsumer.setMessageListener(responseListener);
  msg.setJMSCorrelationID(msg.getJMSCorrelationID()+i);
  
  qsender.send(msg);
  </code></pre>
  
  <p>In the above code, what is the temporary queue used for? Is it for receiving the messages? Is it the receiver? And if yes, whats the use of <code>msg.setJMSReplyTo(temp1)</code> ? </p>