{
exchangeRegistry.unregisterExchange(body.exchange, body.ifUnused);
// AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
// TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
// Be aware of possible changes to parameter order as versions change.
AMQFrame response = ExchangeDeleteOkBody.createAMQFrame(evt.getChannelId(), (byte)8, (byte)0);
session.writeFrame(response);
}
catch (ExchangeInUseException e)
{
// TODO: sort out consistent channel close mechanism that does all clean up etc.