Skip to content

Commit d13ed0d

Browse files
Merge pull request #226274 from mcollier/mcollier/retry-approach
Event Hubs Retry Approach
2 parents 4b4bed0 + 79428ae commit d13ed0d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

articles/azure-functions/functions-bindings-error-pages.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ Starting with version 3.x of the Azure Functions runtime, you can define retry p
6868

6969
The retry policy tells the runtime to rerun a failed execution until either successful completion occurs or the maximum number of retries is reached.
7070

71-
A retry policy is evaluated when a Timer, Kafka, or Event Hubs-triggered function raises an uncaught exception. As a best practice, you should catch all exceptions in your code and rethrow any errors that you want to result in a retry. Event Hubs checkpoints won't be written until the retry policy for the execution has finished. Because of this behavior, progress on the specific partition is paused until the current batch has finished.
71+
A retry policy is evaluated when a Timer, Kafka, or Event Hubs-triggered function raises an uncaught exception. As a best practice, you should catch all exceptions in your code and rethrow any errors that you want to result in a retry.
72+
73+
> [!IMPORTANT]
74+
> Event Hubs checkpoints won't be written until the retry policy for the execution has finished. Because of this behavior, progress on the specific partition is paused until the current batch has finished.
75+
>
76+
> The Event Hubs v5 extension supports additional retry capabilities for interactions between the Functions host and the event hub. Please refer to the `clientRetryOptions` in [the Event Hubs section of the host.json](functions-bindings-event-hubs.md#host-json) file for more information.
7277
7378
#### Retry strategies
7479

includes/functions-bindings-event-hubs.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ The [host.json](../articles/azure-functions/functions-host-json.md#eventhub) fil
147147
|---------|---------|---------|
148148
| maxEventBatchSize| 10| The maximum number of events that will be included in a batch for a single invocation. Must be at least 1.|
149149
| batchCheckpointFrequency| 1| The number of batches to process before creating a checkpoint for the event hub.|
150-
| prefetchCount| 300| The number of events that will be eagerly requested from Event Hubs and held in a local cache to allow reads to avoid waiting on a network operation|
150+
| prefetchCount| 300| The number of events that will be eagerly requested from Event Hubs and held in a local cache to allow reads to avoid waiting on a network operation|
151151
| transportType| amqpTcp | The protocol and transport that is used for communicating with Event Hubs. Available options: `amqpTcp`, `amqpWebSockets`|
152152
| webProxy| | The proxy to use for communicating with Event Hubs over web sockets. A proxy cannot be used with the `amqpTcp` transport. |
153153
| customEndpointAddress | | The address to use when establishing a connection to Event Hubs, allowing network requests to be routed through an application gateway or other path needed for the host environment. The fully qualified namespace for the event hub is still needed when a custom endpoint address is used and must be specified explicitly or via the connection string.|
@@ -159,6 +159,8 @@ The [host.json](../articles/azure-functions/functions-host-json.md#eventhub) fil
159159
| clientRetryOptions/maximumDelay | 00:00:01 | The maximum delay to allow between retry attempts. |
160160
| clientRetryOptions/maximumRetries | 3 | The maximum number of retry attempts before considering the associated operation to have failed.|
161161

162+
The `clientRetryOptions` are used to retry operations between the Functions host and Event Hubs (such as fetching events and sending events). Please refer to guidance on [Azure Functions error handling and retries](../articles/azure-functions/functions-bindings-error-pages.md#retries) for information on applying retry policies to individual functions.
163+
162164
For a reference of host.json in Azure Functions 2.x and beyond, see [host.json reference for Azure Functions](../articles/azure-functions/functions-host-json.md).
163165

164166
# [Extension v3.x+](#tab/extensionv3)

0 commit comments

Comments
 (0)