/// <summary>
        /// Configures the message retry for the consumer consumer, regardless of message type.
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="configure"></param>
        public static void UseMessageRetry <TMessage>(this IHandlerConfigurator <TMessage> configurator, Action <IRetryConfigurator> configure)
            where TMessage : class
        {
            if (configurator == null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            var observer = new MessageRetryHandlerConfigurationObserver(CancellationToken.None, configure);

            configurator.ConnectHandlerConfigurationObserver(observer);
        }