Connection con2 = (AMQConnection) getConnection("guest", "guest");
AMQSession producerSession = (AMQSession) con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
MessageProducer producer = producerSession.createProducer(queue);
con.start();
StreamMessage sm = producerSession.createStreamMessage();
sm.writeInt(42);
producer.send(sm);
// Allow up to five seconds for the message to arrive with the consumer
final boolean completed = awaitMessages.await(5, TimeUnit.SECONDS);
assertTrue("Message did not arrive with consumer within a reasonable time", completed);