ServiceBusTriggerAttribute 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.
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:
- ServiceBusReceivedMessage
- String
- Bytearray
- BinaryData
- A user-defined type (serialized as JSON)
Constructors
ServiceBusTriggerAttribute(String, String) |
Initializes a new instance of the ServiceBusTriggerAttribute class. |
ServiceBusTriggerAttribute(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
Azure SDK for .NET