private async Task HandleGroupMessage(MsmqMessage m)
        {
            try
            {
                var groupMessage = this.protocol.ReadGroupCommand(m.Body);

                var connection = this.connections[groupMessage.ConnectionId];
                if (connection == null)
                {
                    // user not on this server
                    return;
                }

                if (groupMessage.Action == GroupAction.Remove)
                {
                    await this.RemoveGroupAsyncCore(connection, groupMessage.GroupName);
                }

                if (groupMessage.Action == GroupAction.Add)
                {
                    await this.AddGroupAsyncCore(connection, groupMessage.GroupName);
                }

                // Send an ack to the server that sent the original command.
                var ack = this.protocol.WriteAck(groupMessage.Id);
                await this.msmqBus.PublishAsync(this.queues.GroupManagement(groupMessage.ServerName), ack);
            }
            catch (Exception ex)
            {
                MsmqLog.InternalMessageFailed(this.logger, ex);
            }
        }
        private Task HandleAckMessage(MsmqMessage m)
        {
            try
            {
                var ackId = this.protocol.ReadAck(m.Body);
                this.ackHandler.TriggerAck(ackId);
            }
            catch (Exception ex)
            {
                MsmqLog.InternalMessageFailed(this.logger, ex);
            }

            return(Task.CompletedTask);
        }