You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -51,6 +55,10 @@ Add the extension to your project by installing the [NuGet package](https://www.
51
55
52
56
Add the extension to your project by installing the [NuGet package](https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Extensions.EventHubs), version 4.x.
Version 1.x of the Functions runtime doesn't require an extension.
79
+
68
80
---
69
81
70
82
::: zone-end
@@ -97,17 +109,122 @@ To learn more, see [Update your extensions].
97
109
98
110
You can install this version of the extension in your function app by registering the [extension bundle], version 2.x.
99
111
112
+
# [Functions v1.x](#tab/functionsv1)
113
+
114
+
Version 1.x of the Functions runtime doesn't require extension bundles.
115
+
100
116
---
101
117
102
118
::: zone-end
103
119
104
120
## host.json settings
105
121
<aname="host-json"></a>
106
122
107
-
The [host.json](../articles/azure-functions/functions-host-json.md#eventhub) file contains settings that control behavior for the Event Hubs trigger. The configuration is different depending on the Azure Functions version.
123
+
The [host.json](../articles/azure-functions/functions-host-json.md#eventhub) file contains settings that control behavior for the Event Hubs trigger. The configuration is different depending on the extension version.
| maxEventBatchSize| 10| The maximum number of events that will be included in a batch for a single invocation. Must be at least 1.|
157
+
| batchCheckpointFrequency| 1| The number of batches to process before creating a checkpoint for the event hub.|
158
+
| 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|
159
+
| transportType| amqpTcp | The protocol and transport that is used for communicating with Event Hubs. Available options: `amqpTcp`, `amqpWebSockets`|
160
+
| webProxy|| The proxy to use for communicating with Event Hubs over web sockets. A proxy cannot be used with the `amqpTcp` transport. |
161
+
| 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.|
162
+
| initialOffsetOptions/type | fromStart| The location in the event stream to start processing when a checkpoint does not exist in storage. Applies to all partitions. For more information, see the [OffsetType documentation](/dotnet/api/microsoft.azure.webjobs.eventhubs.offsettype). Available options: `fromStart`, `fromEnd`, `fromEnqueuedTime`|
163
+
| initialOffsetOptions/enqueuedTimeUtc || Specifies the enqueued time of the event in the stream from which to start processing. When `initialOffsetOptions/type` is configured as `fromEnqueuedTime`, this setting is mandatory. Supports time in any format supported by [DateTime.Parse()](/dotnet/standard/base-types/parsing-datetime), such as `2020-10-26T20:31Z`. For clarity, you should also specify a timezone. When timezone isn't specified, Functions assumes the local timezone of the machine running the function app, which is UTC when running on Azure. |
164
+
| clientRetryOptions/mode | exponential | The approach to use for calculating retry delays. Exponential mode will retry attempts with a delay based on a back-off strategy where each attempt will increase the duration that it waits before retrying. The fixed mode will retry attempts at fixed intervals with each delay having a consistent duration. Available options: `exponential`, `fixed`|
165
+
| clientRetryOptions/tryTimeout | 00:01:00 | The maximum duration to wait for an Event Hubs operation to complete, per attempt.|
166
+
| clientRetryOptions/delay | 00:00:00.80 | The delay or back-off factor to apply between retry attempts.|
167
+
| clientRetryOptions/maxDelay | 00:00:01 | The maximum delay to allow between retry attempts. |
168
+
| clientRetryOptions/maxRetries | 3 | The maximum number of retry attempts before considering the associated operation to have failed.|
169
+
170
+
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).
171
+
172
+
# [Extension v3.x+](#tab/extensionv3)
173
+
174
+
```json
175
+
{
176
+
"version": "2.0",
177
+
"extensions": {
178
+
"eventHubs": {
179
+
"batchCheckpointFrequency": 5,
180
+
"eventProcessorOptions": {
181
+
"maxBatchSize": 256,
182
+
"prefetchCount": 512
183
+
},
184
+
"initialOffsetOptions": {
185
+
"type": "fromStart",
186
+
"enqueuedTimeUtc": ""
187
+
}
188
+
}
189
+
}
190
+
}
191
+
```
192
+
193
+
|Property |Default | Description |
194
+
|---------|---------|---------|
195
+
|batchCheckpointFrequency|1|The number of event batches to process before creating an EventHub cursor checkpoint.|
196
+
|eventProcessorOptions/maxBatchSize|10|The maximum event count received per receive loop.|
197
+
|eventProcessorOptions/prefetchCount|300|The default prefetch count used by the underlying `EventProcessorHost`. The minimum allowed value is 10.|
198
+
|initialOffsetOptions/type<sup>1</sup>|fromStart|The location in the event stream from which to start processing when a checkpoint doesn't exist in storage. Options are `fromStart` , `fromEnd` or `fromEnqueuedTime`. `fromEnd` processes new events that were enqueued after the function app started running. Applies to all partitions. For more information, see the [EventProcessorOptions documentation](/dotnet/api/microsoft.azure.eventhubs.processor.eventprocessoroptions.initialoffsetprovider).|
199
+
|initialOffsetOptions/enqueuedTimeUtc<sup>1</sup>|| Specifies the enqueued time of the event in the stream from which to start processing. When `initialOffsetOptions/type` is configured as `fromEnqueuedTime`, this setting is mandatory. Supports time in any format supported by [DateTime.Parse()](/dotnet/standard/base-types/parsing-datetime), such as `2020-10-26T20:31Z`. For clarity, you should also specify a timezone. When timezone isn't specified, Functions assumes the local timezone of the machine running the function app, which is UTC when running on Azure. For more information, see the [EventProcessorOptions documentation](/dotnet/api/microsoft.azure.eventhubs.processor.eventprocessoroptions.initialoffsetprovider).|
200
+
201
+
<sup>1</sup> Support for `initialOffsetOptions` begins with [EventHubs v4.2.0](https://github.com/Azure/azure-functions-eventhubs-extension/releases/tag/v4.2.0).
202
+
203
+
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).
204
+
205
+
# [Functions v1.x](#tab/functionsv1)
206
+
207
+
```json
208
+
{
209
+
"eventHub": {
210
+
"maxBatchSize": 64,
211
+
"prefetchCount": 256,
212
+
"batchCheckpointFrequency": 1
213
+
}
214
+
}
215
+
```
216
+
217
+
|Property |Default | Description |
218
+
|---------|---------|---------|
219
+
|maxBatchSize|64|The maximum event count received per receive loop.|
220
+
|prefetchCount| 300 |The default prefetch that will be used by the underlying `EventProcessorHost`.|
221
+
|batchCheckpointFrequency|1|The number of event batches to process before creating an EventHub cursor checkpoint.|
222
+
223
+
For a reference of host.json in Azure Functions 1.x, see [host.json reference for Azure Functions 1.x](../articles/azure-functions/functions-host-json-v1.md).
0 commit comments