/// <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 IActiveMqBusFactoryConfigurator configurator, IActiveMqHost host, Action <IActiveMqReceiveEndpointConfigurator> configure = null) { if (configurator == null) { throw new ArgumentNullException(nameof(configurator)); } if (host == null) { throw new ArgumentNullException(nameof(host)); } var queueName = host.Topology.CreateTemporaryQueueName("manage-"); IActiveMqReceiveEndpointConfigurator specification = null; configurator.ReceiveEndpoint(host, queueName, x => { x.AutoDelete = true; x.Durable = false; configure?.Invoke(x); specification = x; }); var managementEndpointConfigurator = new ManagementEndpointConfigurator(specification); return(managementEndpointConfigurator); }
public static IManagementEndpointConfigurator ManagementEndpoint(this IInMemoryBusFactoryConfigurator configurator, Action<IReceiveEndpointConfigurator> configure = null) { var queueName = configurator.GetTemporaryQueueName("manage-"); var endpointConfigurator = new InMemoryReceiveEndpointConfigurator(queueName) { TransportConcurrencyLimit = 1 }; configure?.Invoke(endpointConfigurator); configurator.AddBusFactorySpecification(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); }
/// <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 = configurator.GetTemporaryQueueName("manage-"); var endpointConfigurator = new RabbitMqReceiveEndpointConfigurator(host, queueName); configure?.Invoke(endpointConfigurator); configurator.AddBusFactorySpecification(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; }