title: Sending data to Queue and listening for data in same function
body: <p>I'm trying to create a function where I send a JMS message to a queue and listen on a different queue the response. The two queues are different and I want to return when the response is available from the second queue. How should I do this? Should I do while(true)? Doing a MessageListener seems like forces me to call another function to receive the answer when I want to return the function with the response that sent the data.</p>