public async Task Consume(ConsumeContext <SetPrefetchCount> context)
        {
            if (_queueName.Equals(context.Message.QueueName, StringComparison.OrdinalIgnoreCase))
            {
                if (context.Message.Timestamp >= _lastUpdated)
                {
                    try
                    {
                        await _managementPipe.Send(context).ConfigureAwait(false);

                        _lastUpdated = context.Message.Timestamp;

                        await context.RespondAsync <PrefetchCountUpdated>(new
                        {
                            Timestamp = DateTime.UtcNow,
                            QueueName = _queueName,
                            context.Message.PrefetchCount
                        }).ConfigureAwait(false);

                        LogContext.Debug?.Log("Set Prefetch Count: (queue: {QueueName}, count: {PrefetchCount})", _queueName, context.Message.PrefetchCount);
                    }
                    catch (Exception exception)
                    {
                        LogContext.Error?.Log(exception, "Set Prefetch Count failed: (queue: {QueueName}, count: {PrefetchCount})", _queueName,
                                              context.Message.PrefetchCount);

                        throw;
                    }
                }
                else
                {
                    throw new CommandException("The prefetch count was updated after the command was sent.");
                }
            }
        }
        public async Task Consume(ConsumeContext <SetPrefetchCount> context)
        {
            if (_queueName.Equals(context.Message.QueueName, StringComparison.OrdinalIgnoreCase))
            {
                if (context.Message.Timestamp >= _lastUpdated)
                {
                    try
                    {
                        await _managementPipe.Send(context).ConfigureAwait(false);

                        _lastUpdated = context.Message.Timestamp;

                        await context.RespondAsync <PrefetchCountUpdated>(new
                        {
                            Timestamp = DateTime.UtcNow,
                            QueueName = _queueName,
                            context.Message.PrefetchCount
                        }).ConfigureAwait(false);

                        if (_log.IsDebugEnabled)
                        {
                            _log.Debug($"Set Prefetch Count: {context.Message.PrefetchCount} ({_queueName})");
                        }
                    }
                    catch (Exception exception)
                    {
                        if (_log.IsErrorEnabled)
                        {
                            _log.Error($"Set Prefetch Count Failed: {context.Message.PrefetchCount} ({_queueName})", exception);
                        }

                        throw;
                    }
                }
                else
                {
                    throw new CommandException($"The prefetch count was updated after the command was sent.");
                }
            }
        }