Defines our custom headers for internal operations
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlServerMessageQueueReceiveErrorMessage" /> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <param name="queryErrorRetryCount">The query error retry count.</param>
        /// <param name="commandSetErrorCount">The command set error count.</param>
        /// <param name="commandMoveRecord">The command move record.</param>
        /// <param name="log">The log.</param>
        /// <param name="headers">The headers.</param>
        public SqlServerMessageQueueReceiveErrorMessage(QueueConsumerConfiguration configuration,
            IQueryHandler<GetErrorRetryCountQuery, int> queryErrorRetryCount, ICommandHandler<SetErrorCountCommand> commandSetErrorCount,
            ICommandHandler<MoveRecordToErrorQueueCommand> commandMoveRecord,
            ILogFactory log, 
            SqlHeaders headers)
        {
            Guard.NotNull(() => configuration, configuration);
            Guard.NotNull(() => queryErrorRetryCount, queryErrorRetryCount);
            Guard.NotNull(() => commandSetErrorCount, commandSetErrorCount);
            Guard.NotNull(() => commandMoveRecord, commandMoveRecord);
            Guard.NotNull(() => log, log);

            _configuration = configuration;
            _queryErrorRetryCount = queryErrorRetryCount;
            _commandSetErrorCount = commandSetErrorCount;
            _commandMoveRecord = commandMoveRecord;
            _log = log.Create();
            _headers = headers;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlServerMessageQueueReceive" /> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <param name="connectionFactory">The connection factory.</param>
        /// <param name="cancelWork">The cancel work.</param>
        /// <param name="handleMessage">The handle message.</param>
        /// <param name="receiveMessages">The receive messages.</param>
        /// <param name="sqlHeaders">The SQL headers.</param>
        public SqlServerMessageQueueReceive(QueueConsumerConfiguration configuration,
            IConnectionFactory connectionFactory,
            IQueueCancelWork cancelWork,
            HandleMessage handleMessage,
            ReceiveMessage receiveMessages,
            SqlHeaders sqlHeaders)
        {
            Guard.NotNull(() => configuration, configuration);
            Guard.NotNull(() => connectionFactory, connectionFactory);
            Guard.NotNull(() => cancelWork, cancelWork);
            Guard.NotNull(() => handleMessage, handleMessage);
            Guard.NotNull(() => receiveMessages, receiveMessages);
            Guard.NotNull(() => sqlHeaders, sqlHeaders);

            _configuration = configuration;
            _connectionFactory = connectionFactory;
            _cancelWork = cancelWork;
            _handleMessage = handleMessage;
            _receiveMessages = receiveMessages;
            _sqlHeaders = sqlHeaders;
            _disposeConnection = c => c.Dispose(); 

        }