/// <summary>
        /// Configures a AmazonSQS bus.
        /// </summary>
        /// <param name="builder"><see cref="IMassTransitBuilder"/></param>
        /// <param name="connectionName">The client-provided connection name.</param>
        /// <param name="hostAddress">The URI host address of the AWS region (example: amazonsqs://regionSystemName/).</param>
        /// <param name="hostConfigurator">The configuration callback to configure the AmazonSQS bus.</param>
        public static void UseAmazonSqs(this IMassTransitBuilder builder, string connectionName, Uri hostAddress, Action <IAmazonSqsHostBuilder> hostConfigurator = null)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (hostAddress == null)
            {
                throw new ArgumentNullException(nameof(hostAddress));
            }

            var hostBuilder = new AmazonSqsHostBuilder(builder.Services, connectionName, hostAddress);

            hostConfigurator?.Invoke(hostBuilder);
        }
        /// <summary>
        /// Configures a AmazonSQS bus.
        /// </summary>
        /// <param name="builder"><see cref="IMassTransitBuilder"/></param>
        /// <param name="connectionName">The client-provided connection name.</param>
        /// <param name="region">The AWS region to connect to.</param>
        /// <param name="hostConfigurator">The configuration callback to configure the AmazonSQS bus.</param>
        public static void UseAmazonSqs(this IMassTransitBuilder builder, string connectionName, RegionEndpoint region, Action <IAmazonSqsHostBuilder> hostConfigurator = null)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (hostConfigurator == null)
            {
                throw new ArgumentNullException(nameof(hostConfigurator));
            }

            var hostBuilder = new AmazonSqsHostBuilder(builder.Services, connectionName, region);

            hostConfigurator.Invoke(hostBuilder);
        }
        /// <summary>
        /// Configures a AmazonSQS bus by using the specified application configuration.
        /// </summary>
        /// <param name="builder"><see cref="IMassTransitBuilder"/></param>.
        /// <param name="configuration">The <see cref="IConfiguration"/> being bound.</param>
        /// <param name="hostConfigurator">The configuration callback to configure the AmazonSQS bus.</param>
        public static void UseAmazonSqs(this IMassTransitBuilder builder, IConfiguration configuration, Action <IAmazonSqsHostBuilder> hostConfigurator = null)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            var connectionName = configuration["ConnectionName"];
            var hostBuilder    = new AmazonSqsHostBuilder(builder.Services, connectionName, configuration);

            hostConfigurator?.Invoke(hostBuilder);
        }