From 127aa75dfd0db66453c4c309f401281f0627c486 Mon Sep 17 00:00:00 2001 From: Joni Collinge Date: Wed, 15 Feb 2023 19:27:46 +0000 Subject: [PATCH] Add ASB session docs (#3171) * Add note on session id in asb metadata Signed-off-by: Joni Collinge * Add ASB sessions instruction Signed-off-by: Joni Collinge * Change localized URL Signed-off-by: Joni Collinge --------- Signed-off-by: Joni Collinge --- .../supported-pubsub/setup-azure-servicebus-topics.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md index b72fedbf4..0af413e9c 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-topics.md @@ -140,6 +140,8 @@ To set Azure Service Bus metadata when sending a message, set the query paramete > **Note:** The `metadata.MessageId` property does not set the `id` property of the cloud event returned by Dapr and should be treated in isolation. +> **NOTE:** If the `metadata.SessionId` property is not set but the topic requires sessions then an empty session id will be used. + ### Receiving a message with metadata When Dapr calls your application, it will attach Azure Service Bus message metadata to the request using either HTTP headers or gRPC metadata. @@ -155,6 +157,14 @@ To find out more details on the purpose of any of these metadata properties, ple > Note: that all times are populated by the server and are not adjusted for clock skews. +## Subscribe to a session enabled topic + +To subscribe to a topic that has [sessions enabled](https://learn.microsoft.com/azure/service-bus-messaging/message-sessions) you can provide the following properties in the subscription metadata. + +- `requireSessions (default: false)` +- `sessionIdleTimeoutInSec (default: 60)` +- `maxConcurrentSessions (default: 8)` + ## Create an Azure Service Bus broker for topics Follow the instructions [here](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quickstart-topics-subscriptions-portal) on setting up Azure Service Bus Topics.