/// <summary> /// Creates a <see cref="ServiceBusSessionProcessor"/> instance that can be used to process session messages using /// event handlers that are set on the processor. It uses <see cref="ReceiveMode"/> to specify /// how messages are received. Defaults to PeekLock mode. The <see cref="ReceiveMode"/> is set in <see cref="ServiceBusProcessorOptions"/> type. /// </summary> /// /// <param name="queueName">The queue to create a <see cref="ServiceBusSessionProcessor"/> for.</param> /// <param name="options">The set of <see cref="ServiceBusProcessorOptions"/> to use for configuring the /// <see cref="ServiceBusSessionProcessor"/>.</param> /// <returns>A <see cref="ServiceBusSessionProcessor"/> scoped to the specified queue.</returns> public ServiceBusSessionProcessor CreateSessionProcessor( string queueName, ServiceBusSessionProcessorOptions options = default) { ValidateEntityName(queueName); return(new ServiceBusSessionProcessor( entityPath: queueName, connection: Connection, options: options ?? new ServiceBusSessionProcessorOptions())); }
internal ServiceBusSessionProcessor( ServiceBusConnection connection, string entityPath, ServiceBusSessionProcessorOptions options) { _innerProcessor = new ServiceBusProcessor( connection, entityPath, true, options.ToProcessorOptions(), options.SessionIds); }
/// <summary> /// Creates a <see cref="ServiceBusSessionProcessor"/> instance that can be used to process /// messages using event handlers that are set on the processor. It uses <see cref="ReceiveMode"/> to specify /// how messages are received. Defaults to PeekLock mode. The <see cref="ReceiveMode"/> is set in <see cref="ServiceBusProcessorOptions"/> type. /// </summary> /// /// <param name="topicName">The topic to create a <see cref="ServiceBusSessionProcessor"/> for.</param> /// <param name="subscriptionName">The subcription to create a <see cref="ServiceBusSessionProcessor"/> for.</param> /// <param name="options">The set of <see cref="ServiceBusSessionProcessor"/> to use for configuring the /// <see cref="ServiceBusSessionProcessor"/>.</param> /// /// <returns>A <see cref="ServiceBusProcessor"/> scoped to the specified topic and subscription.</returns> public ServiceBusSessionProcessor CreateSessionProcessor( string topicName, string subscriptionName, ServiceBusSessionProcessorOptions options = default) { ValidateEntityName(topicName); return(new ServiceBusSessionProcessor( entityPath: EntityNameFormatter.FormatSubscriptionPath(topicName, subscriptionName), connection: Connection, options: options ?? new ServiceBusSessionProcessorOptions())); }
internal ServiceBusSessionProcessor( ServiceBusConnection connection, string entityPath, ServiceBusSessionProcessorOptions options) { options ??= new ServiceBusSessionProcessorOptions(); InnerProcessor = new ServiceBusProcessor( connection, entityPath, true, options.ToProcessorOptions(), options.SessionIds.ToArray(), options.MaxConcurrentSessions, options.MaxConcurrentCallsPerSession, this); }
internal ServiceBusSessionProcessor( ServiceBusConnection connection, string entityPath, IList <ServiceBusPlugin> plugins, ServiceBusSessionProcessorOptions options) { InnerProcessor = new ServiceBusProcessor( connection, entityPath, true, plugins, options.ToProcessorOptions(), options.SessionIds.ToArray(), options.MaxConcurrentSessions, options.MaxConcurrentCallsPerSession); }
/// <summary> /// Initializes a new instance of the <see cref="ServiceBusSessionProcessor"/> class for use with derived types. /// </summary> /// <param name="client">The client instance to use for the processor.</param> /// <param name="topicName">The topic to create a processor for.</param> /// <param name="subscriptionName">The subscription to create a processor for.</param> /// <param name="options">The set of options to use when configuring the processor.</param> protected ServiceBusSessionProcessor(ServiceBusClient client, string topicName, string subscriptionName, ServiceBusSessionProcessorOptions options) : this(client?.Connection, EntityNameFormatter.FormatSubscriptionPath(topicName, subscriptionName), options) { }
/// <summary> /// Initializes a new instance of the <see cref="ServiceBusSessionProcessor"/> class for use with derived types. /// </summary> /// <param name="client">The client instance to use for the processor.</param> /// <param name="queueName">The queue to create a processor for.</param> /// <param name="options">The set of options to use when configuring the processor.</param> protected ServiceBusSessionProcessor(ServiceBusClient client, string queueName, ServiceBusSessionProcessorOptions options) : this(client?.Connection, queueName, options) { }