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
- from autoRenewTimeout to maxAutoRenewDuration for v2
in functions-bindings-servicebus.md
- moves v1 content into function-host-json-v1.md
- deletes include file since content is no longer shared
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-bindings-service-bus.md
+26-12
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ This example is for Azure Functions version 1.x. To make this code work for 2.x:
74
74
-[omit the access rights parameter](#trigger---configuration)
75
75
- change the type of the log parameter from `TraceWriter` to `ILogger`
76
76
- change `log.Info` to `log.LogInformation`
77
-
77
+
78
78
### Trigger - C# script example
79
79
80
80
The following example shows a Service Bus trigger binding in a *function.json* file and a [C# script function](functions-reference-csharp.md) that uses the binding. The function reads [message metadata](#trigger---message-metadata) and logs a Service Bus queue message.
@@ -157,7 +157,7 @@ The following Java function uses the `@ServiceBusQueueTrigger` annotation from t
157
157
) {
158
158
context.getLogger().info(message);
159
159
}
160
-
```
160
+
```
161
161
162
162
Java functions can also be triggered when a message is added to a Service Bus topic. The following example uses the `@ServiceBusTopicTrigger` annotation to describe the trigger configuration.
163
163
@@ -174,7 +174,7 @@ Java functions can also be triggered when a message is added to a Service Bus to
174
174
) {
175
175
context.getLogger().info(message);
176
176
}
177
-
```
177
+
```
178
178
179
179
### Trigger - JavaScript example
180
180
@@ -276,7 +276,7 @@ The following table explains the binding configuration properties that you set i
276
276
|---------|---------|----------------------|
277
277
|**type** | n/a | Must be set to "serviceBusTrigger". This property is set automatically when you create the trigger in the Azure portal.|
278
278
|**direction** | n/a | Must be set to "in". This property is set automatically when you create the trigger in the Azure portal. |
279
-
|**name** | n/a | The name of the variable that represents the queue or topic message in function code. Set to "$return" to reference the function return value. |
279
+
|**name** | n/a | The name of the variable that represents the queue or topic message in function code. Set to "$return" to reference the function return value. |
280
280
|**queueName**|**QueueName**|Name of the queue to monitor. Set only if monitoring a queue, not for a topic.
281
281
|**topicName**|**TopicName**|Name of the topic to monitor. Set only if monitoring a topic, not for a queue.|
282
282
|**subscriptionName**|**SubscriptionName**|Name of the subscription to monitor. Set only if monitoring a topic, not for a queue.|
@@ -337,7 +337,21 @@ See [code examples](#trigger---example) that use these properties earlier in thi
337
337
338
338
The [host.json](functions-host-json.md#servicebus) filecontainssettingsthatcontrolServiceBustriggerbehavior.
|maxConcurrentCalls|16|Themaximumnumberofconcurrentcallstothecallbackthatthemessagepumpshouldinitiate. Bydefault, theFunctionsruntimeprocessesmultiplemessagesconcurrently. Todirecttheruntimetoprocessonlyasinglequeueortopicmessageatatime, set `maxConcurrentCalls` to 1. |
In the [Java functions runtime library](/java/api/overview/azure/functions/runtime), use the `@QueueOutput` annotation on function parameters whose value would be written to a Service Bus queue. The parameter type should be `OutputBinding<T>`, where T is any native Java type of a POJO.
475
489
@@ -580,7 +594,7 @@ The following table explains the binding configuration properties that you set i
580
594
|---------|---------|----------------------|
581
595
|**type**| n/a | Must be set to "serviceBus". This property is set automatically when you create the trigger in the Azure portal.|
582
596
|**direction**| n/a | Must be set to "out". This property is set automatically when you create the trigger in the Azure portal. |
583
-
|**name**| n/a | The name of the variable that represents the queue or topic in function code. Set to "$return" to reference the function return value. |
597
+
|**name**| n/a | The name of the variable that represents the queue or topic in function code. Set to "$return" to reference the function return value. |
584
598
|**queueName**|**QueueName**|Name of the queue. Set only if sending queue messages, not for a topic.
585
599
|**topicName**|**TopicName**|Name of the topic to monitor. Set only if sending topic messages, not for a queue.|
586
600
|**connection**|**Connection**|The name of an app setting that contains the Service Bus connection string to use for this binding. If the app setting name begins with "AzureWebJobs", you can specify only the remainder of the name. For example, if you set `connection` to "MyServiceBus", the Functions runtime looks for an app setting that is named "AzureWebJobsMyServiceBus." If you leave `connection` empty, the Functions runtime uses the default Service Bus connection string in the app setting that is named "AzureWebJobsServiceBus".<br><br>To obtain a connection string, follow the steps shown at [Get the management credentials](../service-bus-messaging/service-bus-dotnet-get-started-with-queues.md#get-the-connection-string). The connection string must be for a Service Bus namespace, not limited to a specific queue or topic.|
@@ -639,11 +653,11 @@ This section describes the global configuration settings available for this bind
639
653
```
640
654
641
655
|Property |Default | Description |
642
-
|---------|---------|---------|
643
-
|maxAutoRenewDuration|00:05:00|The maximum duration within which the message lock will be renewed automatically.|
644
-
|autoComplete|true|Whether the trigger should immediately mark as complete (autocomplete) or wait for processing to call complete.|
645
-
|maxConcurrentCalls|16|The maximum number of concurrent calls to the callback that the message pump should initiate. By default, the Functions runtime processes multiple messages concurrently. To direct the runtime to process only a single queue or topic message at a time, set `maxConcurrentCalls` to 1. |
646
-
|prefetchCount|n/a|The default PrefetchCount that will be used by the underlying MessageReceiver.|
656
+
|---------|---------|---------|
657
+
|maxAutoRenewDuration|00:05:00|The maximum duration within which the message lock will be renewed automatically.|
658
+
|autoComplete|true|Whether the trigger should immediately mark as complete (autocomplete) or wait for processing to call complete.|
659
+
|maxConcurrentCalls|16|The maximum number of concurrent calls to the callback that the message pump should initiate. By default, the Functions runtime processes multiple messages concurrently. To direct the runtime to process only a single queue or topic message at a time, set `maxConcurrentCalls` to 1. |
660
+
|prefetchCount|n/a|The default PrefetchCount that will be used by the underlying MessageReceiver.|
|maxConcurrentCalls|16|The maximum number of concurrent calls to the callback that the message pump should initiate. By default, the Functions runtime processes multiple messages concurrently. To direct the runtime to process only a single queue or topic message at a time, set `maxConcurrentCalls` to 1. |
255
+
|prefetchCount|n/a|The default PrefetchCount that will be used by the underlying MessageReceiver.|
256
+
|autoRenewTimeout|00:05:00|The maximum duration within which the message lock will be renewed automatically.|
0 commit comments