ServiceBusTriggerAttribute Class

Definition

Attribute used to bind a parameter to a ServiceBus Queue message, causing the function to run when a message is enqueued.

[Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.ServiceBusAccountAttribute))]
[Microsoft.Azure.WebJobs.Description.Binding]
[System.AttributeUsage(System.AttributeTargets.Parameter)]
public sealed class ServiceBusTriggerAttribute : Attribute, Microsoft.Azure.WebJobs.IConnectionProvider
[<Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.ServiceBusAccountAttribute))>]
[<Microsoft.Azure.WebJobs.Description.Binding>]
[<System.AttributeUsage(System.AttributeTargets.Parameter)>]
type ServiceBusTriggerAttribute = class
    inherit Attribute
    interface IConnectionProvider
Public NotInheritable Class ServiceBusTriggerAttribute
Inherits Attribute
Implements IConnectionProvider
Inheritance
ServiceBusTriggerAttribute
Attributes
Microsoft.Azure.WebJobs.ConnectionProviderAttribute Microsoft.Azure.WebJobs.Description.BindingAttribute AttributeUsageAttribute
Implements
Microsoft.Azure.WebJobs.IConnectionProvider

Remarks

The method parameter type can be one of the following:

Constructors

ServiceBusTriggerAttribute(String)

Initializes a new instance of the ServiceBusTriggerAttribute class.

ServiceBusTriggerAttribute(String, String)

Initializes a new instance of the ServiceBusTriggerAttribute class.

Properties

AutoCompleteMessages

Gets or sets a value indicating whether trigger should automatically complete the message after successful processing. If not explicitly set, the behavior will be based on the AutoCompleteMessages value.

Connection

Gets or sets the app setting name that contains the Service Bus connection string.

IsSessionsEnabled

Gets or sets a value indicating whether sessions are enabled.

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.

QueueName

Gets the name of the queue to bind to.

SubscriptionName

Gets the name of the subscription in TopicName to bind to.

TopicName

Gets the name of the topic to bind to.

Applies to