/// <summary>
        /// Creates a management endpoint which can be used by controllable filters on a bus intance
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="configure"></param>
        /// <returns></returns>
        public static IManagementEndpointConfigurator ManagementEndpoint(this IInMemoryBusFactoryConfigurator configurator,
            Action<IReceiveEndpointConfigurator> configure = null)
        {
            var queueName = configurator.GetTemporaryQueueName("manage-");

            var specification = new InMemoryReceiveEndpointSpecification(queueName)
            {
                TransportConcurrencyLimit = 1
            };

            configure?.Invoke(specification);

            configurator.AddReceiveEndpointSpecification(specification);

            var managementEndpointConfigurator = new ManagementEndpointConfigurator(specification);

            return managementEndpointConfigurator;
        }
        /// <summary>
        /// Registers a management endpoint on the bus, which can be used to control
        /// filters and other management control points on the bus.
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="host">The host where the endpoint is to be created</param>
        /// <param name="configure">Configure additional values of the underlying receive endpoint</param>
        /// <returns></returns>
        public static IManagementEndpointConfigurator ManagementEndpoint(this IRabbitMqBusFactoryConfigurator configurator,
            IRabbitMqHost host, Action<IRabbitMqReceiveEndpointConfigurator> configure = null)
        {
            if (configurator == null)
                throw new ArgumentNullException(nameof(configurator));
            if (host == null)
                throw new ArgumentNullException(nameof(host));

            var queueName = host.GetTemporaryQueueName("manage-");

            var endpointConfigurator = new RabbitMqReceiveEndpointSpecification(host, queueName)
            {
                AutoDelete = true,
                Durable = false
            };

            configure?.Invoke(endpointConfigurator);

            configurator.AddReceiveEndpointSpecification(endpointConfigurator);

            var managementEndpointConfigurator = new ManagementEndpointConfigurator(endpointConfigurator);

            return managementEndpointConfigurator;
        }
        /// <summary>
        /// Creates a management endpoint which can be used by controllable filters on a bus intance
        /// </summary>
        /// <param name="configurator"></param>
        /// <param name="host">The service bus host</param>
        /// <param name="configure"></param>
        /// <returns></returns>
        public static IManagementEndpointConfigurator ManagementEndpoint(this IServiceBusBusFactoryConfigurator configurator,
            IServiceBusHost host, Action<IReceiveEndpointConfigurator> configure = null)
        {
            var queueName = host.GetTemporaryQueueName("manage-");

            var specification = new ServiceBusReceiveEndpointSpecification(host, queueName)
            {
                AutoDeleteOnIdle = TimeSpan.FromMinutes(5),
                EnableExpress = true,
            };

            configure?.Invoke(specification);

            configurator.AddReceiveEndpointSpecification(specification);

            var managementEndpointConfigurator = new ManagementEndpointConfigurator(specification);

            return managementEndpointConfigurator;
        }