Skip to content

Commit a15eacd

Browse files
author
Glenn Gailey
committed
1 parent a415386 commit a15eacd

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ The following table explains the binding configuration properties that you set i
283283
|**queueName**|**QueueName**|Name of the queue. Set only if sending queue messages, not for a topic.
284284
|**topicName**|**TopicName**|Name of the topic. Set only if sending topic messages, not for a queue.|
285285
|**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-quickstart-portal.md#get-the-connection-string). The connection string must be for a Service Bus namespace, not limited to a specific queue or topic.|
286-
|**accessRights**|**Access**|Access rights for the connection string. Available values are `manage` and `listen`. The default is `manage`, which indicates that the `connection` has the **Manage** permission. If you use a connection string that does not have the **Manage** permission, set `accessRights` to "listen". Otherwise, the Functions runtime might fail trying to do operations that require manage rights. In Azure Functions version 2.x and higher, this property is not available because the latest version of the Service Bus SDK doesn't support manage operations.|
286+
|**accessRights** (v1 only)|**Access**|Access rights for the connection string. Available values are `manage` and `listen`. The default is `manage`, which indicates that the `connection` has the **Manage** permission. If you use a connection string that does not have the **Manage** permission, set `accessRights` to "listen". Otherwise, the Functions runtime might fail trying to do operations that require manage rights. In Azure Functions version 2.x and higher, this property is not available because the latest version of the Service Bus SDK doesn't support manage operations.|
287287

288288
[!INCLUDE [app settings to local.settings.json](../../includes/functions-app-settings-local.md)]
289289

@@ -362,9 +362,9 @@ This section describes the global configuration settings available for this bind
362362
"serviceBus": {
363363
"prefetchCount": 100,
364364
"messageHandlerOptions": {
365-
"autoComplete": false,
365+
"autoComplete": true,
366366
"maxConcurrentCalls": 32,
367-
"maxAutoRenewDuration": "00:55:00"
367+
"maxAutoRenewDuration": "00:05:00"
368368
},
369369
"sessionHandlerOptions": {
370370
"autoComplete": false,
@@ -376,13 +376,15 @@ This section describes the global configuration settings available for this bind
376376
}
377377
}
378378
```
379+
If you have `isSessionsEnabled` set to `true`, the `sessionHandlerOptions` will be honored. If you have `isSessionsEnabled` set to `false`, the `messageHandlerOptions` will be honored.
379380

380381
|Property |Default | Description |
381382
|---------|---------|---------|
382383
|prefetchCount|0|Gets or sets the number of messages that the message receiver can simultaneously request.|
383384
|maxAutoRenewDuration|00:05:00|The maximum duration within which the message lock will be renewed automatically.|
384-
|autoComplete|true|Whether the trigger should immediately mark the message as complete (autocomplete) or wait for function to exit successfully to call complete.|
385-
|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. |
385+
|autoComplete|true|Whether the trigger should automatically call complete after processing, or if the function code will manually call complete.|
386+
|maxConcurrentCalls|16|The maximum number of concurrent calls to the callback that the message pump should initiate per scaled instance. By default, the Functions runtime processes multiple messages concurrently.|
387+
|maxConcurrentSessions|2000|The maximum number of sessions that can be handled concurrently per scaled instance.|
386388

387389
## Next steps
388390

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

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ ms.author: cshoe
1111

1212
# Azure Service Bus trigger for Azure Functions
1313

14-
Use the Service Bus trigger to respond to messages from a Service Bus queue or topic.
14+
Use the Service Bus trigger to respond to messages from a Service Bus queue or topic.
15+
Starting with extension version 3.1.0, you can trigger on a session-enabled queue or topic.
1516

1617
For information on setup and configuration details, see the [overview](functions-bindings-service-bus-output.md).
1718

@@ -219,7 +220,7 @@ In [C# class libraries](functions-dotnet-class-library.md), use the following at
219220
}
220221
```
221222

222-
You can set the `Connection` property to specify the name of an app setting that contains the Service Bus connection string to use, as shown in the following example:
223+
Since the `Connection` property isn't defined, Functions looks for an app setting named `AzureWebJobsServiceBus`, which is the default name for the Service Bus connection string. You can also set the `Connection` property to specify the name of an application setting that contains the Service Bus connection string to use, as shown in the following example:
223224

224225
```csharp
225226
[FunctionName("ServiceBusQueueTriggerCSharp")]
@@ -353,21 +354,24 @@ The `maxAutoRenewDuration` is configurable in *host.json*, which maps to [OnMess
353354
354355
## Message metadata
355356

356-
The Service Bus trigger provides several [metadata properties](./functions-bindings-expressions-patterns.md#trigger-metadata). These properties can be used as part of binding expressions in other bindings or as parameters in your code. These properties are members of the [BrokeredMessage](https://docs.microsoft.com/dotnet/api/microsoft.servicebus.messaging.brokeredmessage) class.
357+
The Service Bus trigger provides several [metadata properties](./functions-bindings-expressions-patterns.md#trigger-metadata). These properties can be used as part of binding expressions in other bindings or as parameters in your code. These properties are members of the [Message](/dotnet/api/microsoft.azure.servicebus.message?view=azure-dotnet) class.
357358

358359
|Property|Type|Description|
359360
|--------|----|-----------|
360-
|`DeliveryCount`|`Int32`|The number of deliveries.|
361+
|`ContentType`|`string`|A content type identifier utilized by the sender and receiver for application-specific logic.|
362+
|`CorrelationId`|`string`|The correlation ID.|
361363
|`DeadLetterSource`|`string`|The dead letter source.|
362-
|`ExpiresAtUtc`|`DateTime`|The expiration time in UTC.|
364+
|`DeliveryCount`|`Int32`|The number of deliveries.|
363365
|`EnqueuedTimeUtc`|`DateTime`|The enqueued time in UTC.|
366+
|`ExpiresAtUtc`|`DateTime`|The expiration time in UTC.|
367+
|`Label`|`string`|The application-specific label.|
364368
|`MessageId`|`string`|A user-defined value that Service Bus can use to identify duplicate messages, if enabled.|
365-
|`ContentType`|`string`|A content type identifier utilized by the sender and receiver for application-specific logic.|
369+
|`MessageReceiver`|`MessageReceiver`|Service Bus message receiver. Can be used to abandon, complete, or deadletter the message.|
370+
|`MessageSession`|`MessageSession`|A message receiver specifically for session-enabled queues and topics.|
366371
|`ReplyTo`|`string`|The reply to queue address.|
367-
|`SequenceNumber`|`Int64`|The unique number assigned to a message by the Service Bus.|
372+
|`SequenceNumber`|`long`|The unique number assigned to a message by the Service Bus.|
368373
|`To`|`string`|The send to address.|
369-
|`Label`|`string`|The application-specific label.|
370-
|`CorrelationId`|`string`|The correlation ID.|
374+
|`UserProperties`|`IDictionary<string, object>`|Properties set by the sender.|
371375

372376
See [code examples](#example) that use these properties earlier in this article.
373377

0 commit comments

Comments
 (0)