title: Synchronous behavior with JMS Topic
body: <p>I have below pseudo code of flow which uses queue to send the message and then listen to topic synchronously. The underlying JMS provider is Tibco EMS.</p>
  
  <pre><code>//Send to Queue
  Connection connection = createConnection(); // get the JMS connection
  Session session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
  Queue queue = session.createQueue("sample.queue");
  MessageProducer messageProducer =  session.createProducer(queue);
  Message message = createMessage(); //create JMS message
  messageProducer.send(message);
  </code></pre>
  
  <p>Now, I listen to a topic using same <code>session</code> object created and wait till there is a response.</p>
  
  <pre><code>Topic topic = session.createTopic("sample.topic");
  MessageConsumer messageConsumer =  session.createConsumer(topic);
  //wait for the reply.
  Message responseMessage = messageConsumer.receive(60000);
  if(responseMessage != null) {
      System.out.println("Message received..");
  }
  </code></pre>
  
  <p>The problem that I am facing is that the message object is coming out as null. I tested with a jms monitoring tool and the topic does have some message, but the above code is not able to pick it up even after 60 secs. </p>
  
  <p>Any idea what am I missing here ?</p>