Receive
Receive events from Azure Event Hub.
Task version: 2.7.0
Required Frends version: 5.5+
Required .NET version: 6.0
Compatible Agents: Crossplatform
Source code: https://github.com/FrendsPlatform/Frends.AzureEventHub/tree/main/Frends.AzureEventHub.Receive
Task Parameters
AuthenticationMethod : AuthenticationMethod
Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
Possible values:
ConnectionString: Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
SASToken: Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
OAuth2: Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
Default: 0
Example: AuthenticationMethod.ConnectionString
EventHubName : String
Specifies the name of the Event Hub to connect to.
Default: -
Example: ExampleHub
ConsumerGroup : String
Specifies the name of the consumer group for reading events.
If left empty, the default consumer group will be used.
Default: -
Example: $Default
🗝ConnectionString : String
Specifies the connection string for the Event Hub.
Required when using AuthenticationMethod.ConnectionString.
Default: -
Example: Endpoint=sb://NamespaceName.servicebus.windows.net/;SharedAccessKeyName=KeyName;SharedAccessKey=KeyValue
Namespace : String
Specifies the fully qualified namespace of the Event Hub.
Required when using SAS Token or OAuth2 authentication methods.
Default: -
Example: {yournamespace}.servicebus.windows.net
🗝SASToken : String
Specifies the Shared Access Signature token for authentication.
Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration.
Default: -
Example: sv=2021-04-10&se=2022-04-10T10%3A431Z&sr=c&sp=l&sig=ZJg983RovE%2BZXI
🗝TenantId : String
Specifies the Azure Active Directory tenant (directory) ID for OAuth2 authentication.
Default: -
Example: Y6b1hf2a-80e2-xyz2-qwer3h-3a7c3a8as4b7f
🗝ClientId : String
Specifies the client (application) ID for OAuth2 authentication.
Default: -
Example: Y6b1hf2a-80e2-xyz2-qwer3h-3a7c3a8as4b7f
🗝ClientSecret : String
Specifies the client secret generated for the App Registration used for OAuth2 authentication.
Default: -
Example: Password
MaximumWaitTime : Double
Specifies the maximum wait time (in seconds) for an event to become available before emitting an empty event.
If set to 0, the processor will wait indefinitely for an event to become available.
Note: Consumer.MaximumWaitTime cannot exceed Options.MaxRunTime when Options.MaxRunTime is greater than 0.
Default: 0
Example: 0, 10 , 10.1
AuthenticationMethod : AuthenticationMethod
Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
Possible values:
ConnectionString: Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
SASToken: Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
OAuth2: Specifies the method used for authentication.
Default is AuthenticationMethod.ConnectionString.
Default: 0
Example: AuthenticationMethod.ConnectionString
ContainerName : String
The name of the blob container.
Default: -
Example: examplecontainer
CreateContainer : Boolean
If true, a new container is created under the specified account if it doesn’t exist.
Not supported when using SAS Token as an authentication method.
Default: False
Example: false
🗝ConnectionString : String
A connection string for the blob container.
Default: -
Example: DefaultEndpointsProtocol=https;AccountName=accountname;AccountKey=Pdlrxyz==;EndpointSuffix=core.windows.net
BlobContainerUri : String
The URI of the blob container.
Required when using SAS Token or OAuth2 authentication method.
Default: -
Example: https://{account_name}.blob.core.windows.net/{container_name}
🗝SASToken : String
Shared access signature token.
Default: -
Example: sv=2021-04-10&se=2022-04-10T10%3A431Z&sr=c&sp=l&sig=ZJg9aovE%2BZXI
🗝TenantId : String
The Azure Active Directory tenant (directory) Id.
Required for OAuth2 authentication method.
Default: -
Example: Y6b1hf2a-80e2-xyz2-qwer3h-3a7c3a8as4b7f
🗝ClientId : String
The client (application) ID.
Required for OAuth2 authentication method.
Default: -
Example: Y6b1hf2a-80e2-xyz2-qwer3h-3a7c3a8as4b7f
🗝ClientSecret : String
A client secret.
Required for OAuth2 authentication method.
Default: -
Example: Password
ExceptionHandler : ExceptionHandlers
Determines how exceptions are handled during Task execution.
Setting this to ExceptionHandlers.Info will log the exception message to Result.Errors and attempt to continue the Task execution, if possible.
Possible values:
Info: Determines how exceptions are handled during Task execution.
Setting this to ExceptionHandlers.Info will log the exception message to Result.Errors and attempt to continue the Task execution, if possible.
Throw: Determines how exceptions are handled during Task execution.
Setting this to ExceptionHandlers.Info will log the exception message to Result.Errors and attempt to continue the Task execution, if possible.
Default: 0
Example: ExceptionHandlers.Info
ConsumeAttemptDelay : Double
Specifies the delay (in seconds) between each attempt to consume data.
NOTE: Must be at least 0.1
Default: 1
Example: 1, 0.5
MaxRunTime : Double
Sets the maximum duration (in seconds) for the Task to run.
If set to 0, the Task can run indefinitely.
Note that both MaxRunTime and MaxEvents cannot be set to unlimited.
Default: 0
Example: 0, 10, 1.5
MaxEvents : Int32
Defines the maximum number of events to be received before ending the Task.
If set to 0, the Task can receive an unlimited number of events.
Note that both MaxRunTime and MaxEvents cannot be set to unlimited.
Default: 0
Example: 0, 5
Task Result
Success : Boolean
Indicates whether the Task completed without errors.
Example: true
Data : List<Object>
Contains a list of events.
Example: { "foo", bar }
Errors : List<Object>
Contains a list of errors If Options.ExceptionHandlers is set to Throw.
Example: { "An exception occured", "Another exception occured" }
Task Changelog
Changelog for Task Frends.AzureEventHub.Receive.
[2.7.0] - 2026-04-26
Fixed
Resolve the problem with short delays between checks
[2.6.0] - 2026-01-16
Changed
Update Azure packages to latest versions.
Azure.Identity to 1.17.1
Azure.Messaging.EventHubs to 5.12.2
Azure.Messaging.EventHubs.Processor to 5.12.2
[2.5.0] - 2025-09-22
Changed
Show ContainerName parameter only when AuthenticationMethod is set to ConnectionString.
[2.4.0] - 2024-11-13
Changed
Upgraded Azure.Messaging.EventHubs to version 5.11.5.
Upgraded Azure.Messaging.EventHubs.Processor to version 5.11.5.
[2.3.0] - 2024-10-30
Fixed
Issue #11 - Fixed Receive hanging in execution by adding a check for the MaximumWaitTime.
[2.2.0] - 2024-08-22
Added
Updated Azure.Identity to the latest version 1.12.0.
[2.1.0] - 2024-05-31
Changed
Replaced the List<> with a ConcurrentBag<> for the received messages.
[2.0.1] - 2023-11-29
Fixed
Fixed ExceptionHandler check in catch and documentational fixes.
[2.0.0] - 2023-10-31
Added
New property
Result.Errors.
Changed
Improved descriptions and examples.
Errors and exceptions will be listed in
Result.ErrorsifOptions.ExceptionHandleris set toExceptionHandlers.Info.Renamed
Options.MaximumWaitTimeInMinutestoOptions.MaxRunTime.Options.MaxRunTime(previously calledOptions.MaximumWaitTimeInMinutes) is now in seconds instead of minutes.Consumer.MaximumWaitTimecannot exceedOptions.MaxRunTimewhenOptions.MaxRunTimeis greater than 0.Renamed
Consumer.FullyQualifiedNamespacetoConsumer.Namespace.Renamed
Options.DelaytoOptions.ConsumeAttemptDelay.Package updates:
Azure.Identity 1.8.2 to 1.10.3
Azure.Messaging.EventHubs 5.9.0 to 5.9.3
Azure.Messaging.EventHubs.Processor 5.9.0 to 5.9.3
System.ComponentModel.Annotations 4.7.0 to 5.0.0
[1.0.0] - 2023-05-31
Added
Initial implementation
Last updated
Was this helpful?

