Class EventHubTriggerAttribute | Azure SDK for .NET
Leah Mitchell
Published Feb 16, 2026
Setup an 'trigger' on a parameter to listen on events from an event hub.
Inheritance
System.Attribute
EventHubTriggerAttribute
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.WebJobs.Extensions.EventHubs.dll
Syntax
[Microsoft.Azure.WebJobs.Description.Binding]
[System.AttributeUsage(System.AttributeTargets.Parameter)]
public sealed class EventHubTriggerAttribute : Attribute Constructors
EventHubTriggerAttribute(String)
Create an instance of this attribute.
Declaration
public EventHubTriggerAttribute (string eventHubName); Parameters
| System.String eventHubName Event hub to listen on for messages. |
Properties
Connection
Gets or sets the optional app setting name that contains the Event Hub connection string. If missing, tries to use a registered event hub receiver.
Declaration
public string Connection { get; set; } Property Value
| System.String |
ConsumerGroup
Optional Name of the consumer group. If missing, then use the default name, "$Default"
Declaration
public string ConsumerGroup { get; set; } Property Value
| System.String |
EventHubName
Name of the event hub.
Declaration
public string EventHubName { get; } Property Value
| System.String |