Target target = new Target();
target.setAddress(UUID.randomUUID().toString());
try
{
Receiver receiver = new Receiver(getClientSession(), s, target, null,
org.apache.qpid.amqp_1_0.client.AcknowledgeMode.ALO, false);
final org.apache.qpid.amqp_1_0.type.Source receiverSource = receiver.getSource();
if(receiverSource instanceof Source)
{
Source source = (Source) receiverSource;
receiver.close();
receiver = new Receiver(getClientSession(), s, target, source,
org.apache.qpid.amqp_1_0.client.AcknowledgeMode.ALO, false);
}
receiver.close();
}
catch(ConnectionErrorException e)
{
if(e.getRemoteError().getCondition() == AmqpError.NOT_FOUND)
{