conn.connect();
Session s = conn.createSession(INBOUND_WINDOW, OUTBOUND_WINDOW);
Consumer c = s.createConsumer(consumerSource, CONSUMER_LINK_CREDIT, QoS.AT_LEAST_ONCE, false, null);
Producer p = s.createProducer(producerTarget, QoS.AT_LEAST_ONCE);
AMQPMessage msg = msg();
AmqpValue sentinel = new AmqpValue(new AMQPDouble(Math.random()));
msg.setAmqpValue(sentinel);
Properties props = new Properties();
props.setSubject(new AMQPString(routingKey));
msg.setProperties(props);
p.send(msg);
if (succeed) {
AMQPMessage m = c.receive();
assertNotNull(m);
assertEquals(sentinel.getValue().getValueString(), m.getAmqpValue().getValue().getValueString());
m.accept();
} else {
assertNull(get(c));
}
c.close();
p.close();