Skip to content

Commit 6a7a2ea

Browse files
committed
Moved host.json settings to a single location.
1 parent 55049c8 commit 6a7a2ea

File tree

4 files changed

+40
-33
lines changed

4 files changed

+40
-33
lines changed

articles/azure-functions/functions-host-json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Configuration setting can be found in [bindings for Durable Functions](durable/d
211211

212212
## eventHub
213213

214-
Configuration settings can be found in [Event Hub triggers and bindings](functions-bindings-event-hubs-output.md#host-json).
214+
Configuration settings can be found in [Event Hub triggers and bindings](functions-bindings-event-hubs-trigger.md#host-json).
215215

216216
## extensions
217217

includes/functions-bindings-event-hubs-output.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -288,33 +288,3 @@ There are two options for outputting an Event Hub message from a function by usi
288288
| Binding | Reference |
289289
|---|---|
290290
| Event Hub | [Operations Guide](https://docs.microsoft.com/rest/api/eventhub/publisher-policy-operations) |
291-
292-
<a name="host-json"></a>
293-
294-
## host.json settings
295-
296-
This section describes the global configuration settings available for this binding in versions 2.x and higher. The example host.json file below contains only the version 2.x+ settings for this binding. For more information about global configuration settings in versions 2.x and beyond, see [host.json reference for Azure Functions](../articles/azure-functions/functions-host-json.md).
297-
298-
> [!NOTE]
299-
> For a reference of host.json in Functions 1.x, see [host.json reference for Azure Functions 1.x](../articles/azure-functions/functions-host-json-v1.md).
300-
301-
```json
302-
{
303-
"version": "2.0",
304-
"extensions": {
305-
"eventHubs": {
306-
"batchCheckpointFrequency": 5,
307-
"eventProcessorOptions": {
308-
"maxBatchSize": 256,
309-
"prefetchCount": 512
310-
}
311-
}
312-
}
313-
}
314-
```
315-
316-
|Property |Default | Description |
317-
|---------|---------|---------|
318-
|`maxBatchSize`|10|The maximum event count received per receive loop.|
319-
|`prefetchCount`|300|The default pre-fetch count used by the underlying `EventProcessorHost`.|
320-
|`batchCheckpointFrequency`|1|The number of event batches to process before creating an EventHub cursor checkpoint.|

includes/functions-bindings-event-hubs-trigger.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ The following table explains the binding configuration properties that you set i
350350
|**path** |**EventHubName** | Functions 1.x only. The name of the event hub. When the event hub name is also present in the connection string, that value overrides this property at runtime. |
351351
|**eventHubName** |**EventHubName** | Functions 2.x and higher. The name of the event hub. When the event hub name is also present in the connection string, that value overrides this property at runtime. Can be referenced via app settings %eventHubName% |
352352
|**consumerGroup** |**ConsumerGroup** | An optional property that sets the [consumer group](../articles/event-hubs/event-hubs-features.md#event-consumers) used to subscribe to events in the hub. If omitted, the `$Default` consumer group is used. |
353-
|**cardinality** | n/a | For Javascript. Set to `many` in order to enable batching. If omitted or set to `one`, a single message is passed to the function. |
353+
|**cardinality** | n/a | For JavaScript. Set to `many` in order to enable batching. If omitted or set to `one`, a single message is passed to the function. |
354354
|**connection** |**Connection** | The name of an app setting that contains the connection string to the event hub's namespace. Copy this connection string by clicking the **Connection Information** button for the [namespace](../articles/event-hubs/event-hubs-create.md#create-an-event-hubs-namespace), not the event hub itself. This connection string must have at least read permissions to activate the trigger.|
355355

356356
[!INCLUDE [app settings to local.settings.json](../articles/azure-functions/../../includes/functions-app-settings-local.md)]
@@ -372,6 +372,7 @@ The Event Hubs trigger provides several [metadata properties](../articles/azure-
372372
See [code examples](#example) that use these properties earlier in this article.
373373

374374
## host.json properties
375+
<a name="host-json"></a>
375376

376377
The [host.json](../articles/azure-functions/functions-host-json.md#eventhub) file contains settings that control Event Hubs trigger behavior.
377378

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ ms.topic: include
55
ms.date: 09/04/2018
66
ms.author: glenga
77
---
8+
9+
## host.json settings
10+
11+
The host.json file contains settings which control Event Hubs trigger behavior. The configuration is different depending on the Azure Functions version being used.
12+
13+
### Azure Functions 1.0
14+
815
```json
916
{
1017
"eventHub": {
@@ -18,5 +25,34 @@ ms.author: glenga
1825
|Property |Default | Description |
1926
|---------|---------|---------|
2027
|maxBatchSize|64|The maximum event count received per receive loop.|
21-
|prefetchCount|n/a|The default PrefetchCount that will be used by the underlying EventProcessorHost.|
28+
|prefetchCount|n/a|The default pre-fetch that will be used by the underlying `EventProcessorHost`.|
2229
|batchCheckpointFrequency|1|The number of event batches to process before creating an EventHub cursor checkpoint.|
30+
31+
> [!NOTE]
32+
> 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).
33+
34+
### Azure Functions 2.0 and higher
35+
36+
```json
37+
{
38+
"version": "2.0",
39+
"extensions": {
40+
"eventHubs": {
41+
"batchCheckpointFrequency": 5,
42+
"eventProcessorOptions": {
43+
"maxBatchSize": 256,
44+
"prefetchCount": 512
45+
}
46+
}
47+
}
48+
}
49+
```
50+
51+
|Property |Default | Description |
52+
|---------|---------|---------|
53+
|maxBatchSize|10|The maximum event count received per receive loop.|
54+
|prefetchCount|300|The default pre-fetch count used by the underlying `EventProcessorHost`.|
55+
|batchCheckpointFrequency|1|The number of event batches to process before creating an EventHub cursor checkpoint.|
56+
57+
> [!NOTE]
58+
> 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).

0 commit comments

Comments
 (0)