QueueTriggerAttribute 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 an Azure Queue message, causing the function to run when a message is enqueued.
[Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))]
[Microsoft.Azure.WebJobs.Description.Binding]
[System.AttributeUsage(System.AttributeTargets.Parameter)]
public sealed class QueueTriggerAttribute : Attribute, Microsoft.Azure.WebJobs.IConnectionProvider
[<Microsoft.Azure.WebJobs.ConnectionProvider(typeof(Microsoft.Azure.WebJobs.StorageAccountAttribute))>]
[<Microsoft.Azure.WebJobs.Description.Binding>]
[<System.AttributeUsage(System.AttributeTargets.Parameter)>]
type QueueTriggerAttribute = class
inherit Attribute
interface IConnectionProvider
Public NotInheritable Class QueueTriggerAttribute
Inherits Attribute
Implements IConnectionProvider
- Inheritance
-
QueueTriggerAttribute
- 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:
- QueueMessage
- String
- byte[]
- BinaryData
- A user-defined type (serialized as JSON)
By default messages received from the queue are expected to be Base64-encoded and are decoded before calling the function. This behavior can be changed by setting MessageEncoding. For example, to configure Azure Functions to perform no base64 encoding/decoding, specify the following in host.json.
"extensions": {
"queues": {
"messageEncoding": "none"
}
}
Constructors
QueueTriggerAttribute(String) |
Initializes a new instance of the QueueTriggerAttribute class. |
Properties
Connection |
Gets or sets the app setting name that contains the Azure Storage connection string. |
QueueName |
Gets the name of the queue to which to bind. |