msg.decode(bytes, 0, bytes.length);
Object action = ((AmqpValue) msg.getBody()).getValue();
if (action instanceof Declare)
{
Transaction tx = protonSession.getServerSession().getCurrentTransaction();
Declared declared = new Declared();
declared.setTxnId(new Binary(longToBytes(tx.getID())));
delivery.disposition(declared);
delivery.settle();
}
else if (action instanceof Discharge)
{