@Override
public void messageCancel(Session session, MessageCancel method)
{
String destination = method.getDestination();
Subscription_0_10 sub = ((ServerSession)session).getSubscription(destination);
if(sub == null)
{
exception(session, method, ExecutionErrorCode.NOT_FOUND, "not-found: destination '"+destination+"'");
}
else
{
AMQQueue queue = sub.getQueue();
((ServerSession)session).unregister(sub);
if(!queue.isDeleted() && queue.isExclusive() && queue.getConsumerCount() == 0)
{
queue.setAuthorizationHolder(null);
}