public void RemoveConsumer(ConsumerId objectId) { connection.removeDispatcher(objectId); if(!this.closing) { consumers.Remove(objectId); } }