// use another thread to listen and send the reply
Executors.newFixedThreadPool(1).submit(new Callable<Object>() {
public Object call() throws Exception {
JmsTemplate jms = new JmsTemplate(amq.getConfiguration().getConnectionFactory());
final TextMessage msg = (TextMessage) jms.receive("nameRequestor");
assertEquals("What's your name", msg.getText());
// there should be a JMSReplyTo so we know where to send the reply
final Destination replyTo = msg.getJMSReplyTo();