For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Task Parameters

Name
Description

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

Task Result

Name
Description

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.Errors if Options.ExceptionHandler is set to ExceptionHandlers.Info.

  • Renamed Options.MaximumWaitTimeInMinutes to Options.MaxRunTime.

  • Options.MaxRunTime (previously called Options.MaximumWaitTimeInMinutes) is now in seconds instead of minutes.

  • Consumer.MaximumWaitTime cannot exceed Options.MaxRunTime when Options.MaxRunTime is greater than 0.

  • Renamed Consumer.FullyQualifiedNamespace to Consumer.Namespace.

  • Renamed Options.Delay to Options.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?