ServiceBusOptions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configuration options for the ServiceBus extension.
public class ServiceBusOptions : Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter
public class ServiceBusOptions
type ServiceBusOptions = class
interface IOptionsFormatter
type ServiceBusOptions = class
Public Class ServiceBusOptions
Implements IOptionsFormatter
Public Class ServiceBusOptions
- Inheritance
-
ServiceBusOptions
- Implements
-
Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter
Constructors
ServiceBusOptions() |
Constructs a new instance. |
Properties
AutoCompleteMessages |
Gets or sets whether to automatically complete messages after successful execution of the function. The default value is true. |
ClientRetryOptions |
The set of options to use for determining whether a failed operation should be retried and, if so, the amount of time to wait between retry attempts. These options also control the amount of time allowed for receiving messages and other interactions with the Service Bus service. |
ConnectionString | |
EnableCrossEntityTransactions |
Gets or sets a flag that indicates whether or not transactions may span multiple Service Bus entities. |
JsonSerializerSettings |
Gets or sets the JSON serialization settings to use when binding to POCOs. |
MaxAutoLockRenewalDuration |
Gets or sets the maximum duration within which the lock will be renewed automatically. This value should be greater than the longest message lock duration; for example, the LockDuration Property. The default value is 5 minutes. This does not apply for functions that receive a batch of messages. To specify an infinite duration, use InfiniteTimeSpan or -00:00:00.0010000 if specifying via host.json. |
MaxBatchWaitTime |
Gets or sets the maximum time that the trigger should wait to fill a batch before invoking the function. This is only considered when MinMessageBatchSize is set to larger than 1 and is otherwise unused. If less than MinMessageBatchSize messages were available before the wait time elapses, the function will be invoked with a partial batch. This value should be no longer then 50% of the entity message lock duration. Therefore, the maximum allowed value is 2 minutes and 30 seconds. Otherwise, you may get lock exceptions when messages are pulled from the cache. The default value is 30 seconds. |
MaxConcurrentCalls |
Gets or sets the maximum number of messages that can be processed concurrently by a function. This setting does not apply for functions that receive a batch of messages. The default is 16 times the return value of Microsoft.Azure.WebJobs.ServiceBus.Utility.GetProcessorCount. When Microsoft.Azure.WebJobs.Host.Scale.ConcurrencyOptions.DynamicConcurrencyEnabled is true, this value will be ignored, and concurrency will be increased/decreased dynamically. |
MaxConcurrentCallsPerSession |
Gets or sets the maximum number of concurrent calls to the function per session.
Thus the total number of concurrent calls will be equal to MaxConcurrentSessions * MaxConcurrentCallsPerSession.
The default value is 1. This applies only to functions that set IsSessionsEnabled
to |
MaxConcurrentSessions |
Gets or sets the maximum number of sessions that can be processed concurrently by a function.
The default value is 8. This applies only to functions that set IsSessionsEnabled
to |
MaxMessageBatchSize |
Gets or sets the maximum number of messages that will be passed to each function call. This only applies for functions that receive a batch of messages. The default value is 1000. |
MessageHandlerOptions | |
MinMessageBatchSize |
Gets or sets the minimum number of messages desired for a batch. This setting applies only to functions that receive multiple messages. This value must be less than MaxMessageBatchSize and is used in conjunction with MaxBatchWaitTime. If MaxBatchWaitTime passes and less than MinMessageBatchSize has been received, the function will be invoked with a partial batch. Default 1. |
PrefetchCount |
Gets or sets the PrefetchCount that will be used when receiving messages. The default value is 0. |
ProcessErrorAsync |
Gets or sets an optional error handler that will be invoked if an exception occurs while attempting to process a message. This does not apply for functions that receive a batch of messages. |
SessionClosingAsync |
Optional handler that can be set to be notified when a session is about to be closed for processing. |
SessionIdleTimeout |
Gets or sets the maximum amount of time to wait for a message to be received for the currently active session. After this time has elapsed, the processor will close the session and attempt to process another session. If not specified, the TryTimeout will be used. |
SessionInitializingAsync |
Optional handler that can be set to be notified when a new session is about to be processed. |
TransportType |
The type of protocol and transport that will be used for communicating with the Service Bus service. |
WebProxy |
The proxy to use for communication over web sockets. |
Explicit Interface Implementations
IOptionsFormatter.Format() |
Formats the options as JSON objects for display. |
Applies to
Azure SDK for .NET