Skip to content

Commit 371bb33

Browse files
authored
Merge pull request #87606 from jsquire/squire/bindings-docs
[Messaging Bindings] Document Additional Options
2 parents 215cfe7 + 31825eb commit 371bb33

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

articles/azure-functions/functions-bindings-service-bus.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ The example host.json file below contains only the settings for version 5.0.0 an
134134
"maxRetries": 3
135135
},
136136
"prefetchCount": 0,
137+
"transportType": "amqpWebSockets",
138+
"webProxy": "https://proxyserver:8080",
137139
"autoCompleteMessages": true,
138140
"maxAutoLockRenewalDuration": "00:05:00",
139141
"maxConcurrentCalls": 16,
@@ -151,6 +153,8 @@ When using service bus extension version 5.x and higher, the following global co
151153
|Property |Default | Description |
152154
|---------|---------|---------|
153155
|prefetchCount|0|Gets or sets the number of messages that the message receiver can simultaneously request.|
156+
| transportType| amqpTcp | The protocol and transport that is used for communicating with Service Bus. Available options: `amqpTcp`, `amqpWebSockets`|
157+
| webProxy| n/a | The proxy to use for communicating with Service Bus over web sockets. A proxy cannot be used with the `amqpTcp` transport. |
154158
|autoCompleteMessages|true|Determines whether or not to automatically complete messages after successful execution of the function and should be used in place of the `autoComplete` configuration setting.|
155159
|maxAutoLockRenewalDuration|00:05:00|The maximum duration within which the message lock will be renewed automatically. This setting only applies for functions that receive a single message at a time.|
156160
|maxConcurrentCalls|16|The maximum number of concurrent calls to the callback that the should be initiate per scaled instance. By default, the Functions runtime processes multiple messages concurrently. This setting only applies for functions that receive a single message at a time.|

includes/functions-host-json-event-hubs.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,59 @@
22
author: ggailey777
33
ms.service: azure-functions
44
ms.topic: include
5-
ms.date: 09/04/2018
5+
ms.date: 02/07/2022
66
ms.author: glenga
77
---
88

9-
### Functions 2.x and higher
9+
### Functions 2.x and higher with extensions v5.x and higher
10+
11+
```json
12+
{
13+
"version": "2.0",
14+
"extensions": {
15+
"eventHubs": {
16+
"maxEventBatchSize" : 10,
17+
"batchCheckpointFrequency" : 5,
18+
"prefetchCount" : 300,
19+
"transportType" : "amqpWebSockets",
20+
"webProxy" : "https://proxyserver:8080",
21+
"customEndpointAddress" : "amqps://company.gateway.local",
22+
"initialOffsetOptions" : {
23+
"type" : "fromStart",
24+
"enqueuedTimeUtc" : ""
25+
}
26+
"clientRetryOptions":{
27+
"mode" : "exponential",
28+
"tryTimeout" : "00:01:00",
29+
"delay" : "00:00:00.80",
30+
"maxDelay" : "00:01:00",
31+
"maxRetries" : 3
32+
}
33+
}
34+
}
35+
}
36+
```
37+
38+
|Property |Default | Description |
39+
|---------|---------|---------|
40+
| maxEventBatchSize| 10| The maximum number of events that will be included in a batch for a single invocation. Must be at least 1.|
41+
| batchCheckpointFrequency| 1| The number of batches to process before creating a checkpoint for the Event Hub.|
42+
| 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|
43+
| transportType| amqpTcp | The protocol and transport that is used for communicating with Event Hubs. Available options: `amqpTcp`, `amqpWebSockets`|
44+
| webProxy| | The proxy to use for communicating with Event Hubs over web sockets. A proxy cannot be used with the `amqpTcp` transport. |
45+
| 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.|
46+
| 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`|
47+
| 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. |
48+
| 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`|
49+
| clientRetryOptions/tryTimeout | 00:01:00 | The maximum duration to wait for an Event Hubs operation to complete, per attempt.|
50+
| clientRetryOptions/delay | 00:00:00.80 | The delay or back-off factor to apply between retry attempts.|
51+
| clientRetryOptions/maxDelay | 00:00:01 | The maximum delay to allow between retry attempts. |
52+
| clientRetryOptions/maxRetries | 3 | The maximum number of retry attempts before considering the associated operation to have failed.|
53+
54+
> [!NOTE]
55+
> 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).
56+
57+
### Functions 2.x and higher with extensions v4.x and earlier
1058

1159
```json
1260
{
@@ -31,9 +79,9 @@ ms.author: glenga
3179
|---------|---------|---------|
3280
|batchCheckpointFrequency|1|The number of event batches to process before creating an EventHub cursor checkpoint.|
3381
|eventProcessorOptions/maxBatchSize|10|The maximum event count received per receive loop.|
34-
|eventProcessorOptions/prefetchCount|300|The default pre-fetch count used by the underlying `EventProcessorHost`. The minimum allowed value is 10.|
35-
|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).|
36-
|initialOffsetOptions/enqueuedTimeUtc<sup>1</sup>|N/A| 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).|
82+
|eventProcessorOptions/prefetchCount|300|The default prefetch count used by the underlying `EventProcessorHost`. The minimum allowed value is 10.|
83+
|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).|
84+
|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).|
3785

3886
<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).
3987

@@ -55,7 +103,7 @@ ms.author: glenga
55103
|Property |Default | Description |
56104
|---------|---------|---------|
57105
|maxBatchSize|64|The maximum event count received per receive loop.|
58-
|prefetchCount|n/a|The default pre-fetch that will be used by the underlying `EventProcessorHost`.|
106+
|prefetchCount| 300 |The default prefetch that will be used by the underlying `EventProcessorHost`.|
59107
|batchCheckpointFrequency|1|The number of event batches to process before creating an EventHub cursor checkpoint.|
60108

61109
> [!NOTE]

0 commit comments

Comments
 (0)