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
@@ -129,6 +129,47 @@ This component supports **output binding** with the following operations:
129
129
130
130
- `create`: publishes a message to the specified queue
131
131
132
+
## Message metadata
133
+
134
+
Azure Service Bus messages extend the Dapr message format with additional contextual metadata. Some metadata fields are set by Azure Service Bus itself (read-only) and others can be set by the client when publishing a message through `Invoke` binding call with `create` operation.
135
+
136
+
### Sending a message with metadata
137
+
138
+
To set Azure Service Bus metadata when sending a message, set the query parameters on the HTTP request or the gRPC metadata as documented [here]({{< ref "bindings_api.md" >}}).
139
+
140
+
- `metadata.MessageId`
141
+
- `metadata.CorrelationId`
142
+
- `metadata.SessionId`
143
+
- `metadata.Label`
144
+
- `metadata.ReplyTo`
145
+
- `metadata.PartitionKey`
146
+
- `metadata.To`
147
+
- `metadata.ContentType`
148
+
- `metadata.ScheduledEnqueueTimeUtc`
149
+
- `metadata.ReplyToSessionId`
150
+
151
+
{{% alert title="Note" color="primary" %}}
152
+
- The `metadata.MessageId` property does not set the `id` property of the cloud event returned by Dapr and should be treated in isolation.
153
+
- The `metadata.ScheduledEnqueueTimeUtc` property supports the [RFC1123](https://www.rfc-editor.org/rfc/rfc1123) and [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp formats.
154
+
{{% /alert %}}
155
+
156
+
### Receiving a message with metadata
157
+
158
+
When Dapr calls your application, it attaches Azure Service Bus message metadata to the request using either HTTP headers or gRPC metadata.
159
+
In addition to the [settable metadata listed above](#sending-a-message-with-metadata), you can also access the following read-only message metadata.
160
+
161
+
- `metadata.DeliveryCount`
162
+
- `metadata.LockedUntilUtc`
163
+
- `metadata.LockToken`
164
+
- `metadata.EnqueuedTimeUtc`
165
+
- `metadata.SequenceNumber`
166
+
167
+
To find out more details on the purpose of any of these metadata properties, please refer to [the official Azure Service Bus documentation](https://docs.microsoft.com/rest/api/servicebus/message-headers-and-properties#message-headers).
168
+
169
+
{{% alert title="Note" color="primary" %}}
170
+
All times are populated by the server and are not adjusted for clock skews.
171
+
{{% /alert %}}
172
+
132
173
## Specifying a TTL per message
133
174
134
175
Time to live can be defined on a per-queue level (as illustrated above) or at the message level. The value defined at message level overwrites any value set at the queue level.
Copy file name to clipboardExpand all lines: daprdocs/content/en/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ aliases:
11
11
12
12
To set up Azure Service Bus Queues pub/sub, create a component of type `pubsub.azure.servicebus.queues`. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. Read the [How-to: Publish and Subscribe guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pub/sub configuration.
13
13
14
-
> This component uses queues on Azure Service Bus; see the official documentation for the differences between [topics and queues](https://learn.microsoft.com/azure/service-bus-messaging/service-bus-queues-topics-subscriptions).
14
+
> This component uses queues on Azure Service Bus; see the official documentation for the differences between [topics and queues](https://learn.microsoft.com/azure/service-bus-messaging/service-bus-queues-topics-subscriptions).
15
15
> For using topics, see the [Azure Service Bus Topics pubsub component]({{< ref "setup-azure-servicebus-topics" >}}).
16
16
17
17
### Connection String Authentication
@@ -122,7 +122,7 @@ Azure Service Bus messages extend the Dapr message format with additional contex
122
122
123
123
### Sending a message with metadata
124
124
125
-
To set Azure Service Bus metadata when sending a message, set the query parameters on the HTTP request or the gRPC metadata as documented [here](https://docs.dapr.io/reference/api/pubsub_api/#metadata).
125
+
To set Azure Service Bus metadata when sending a message, set the query parameters on the HTTP request or the gRPC metadata as documented [here]({{< ref "pubsub_api.md#metadata" >}}).
126
126
127
127
- `metadata.MessageId`
128
128
- `metadata.CorrelationId`
@@ -135,13 +135,14 @@ To set Azure Service Bus metadata when sending a message, set the query paramete
135
135
- `metadata.ScheduledEnqueueTimeUtc`
136
136
- `metadata.ReplyToSessionId`
137
137
138
-
> **Note:** The `metadata.MessageId` property does not set the `id` property of the cloud event returned by Dapr and should be treated in isolation.
139
-
140
-
> **Note:** The `metadata.ScheduledEnqueueTimeUtc` property supports the [RFC1123](https://www.rfc-editor.org/rfc/rfc1123) and [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp formats.
138
+
{{% alert title="Note" color="primary" %}}
139
+
- The `metadata.MessageId` property does not set the `id` property of the cloud event returned by Dapr and should be treated in isolation.
140
+
- The `metadata.ScheduledEnqueueTimeUtc` property supports the [RFC1123](https://www.rfc-editor.org/rfc/rfc1123) and [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) timestamp formats.
141
+
{{% /alert %}}
141
142
142
143
### Receiving a message with metadata
143
144
144
-
When Dapr calls your application, it will attach Azure Service Bus message metadata to the request using either HTTP headers or gRPC metadata.
145
+
When Dapr calls your application, it attaches Azure Service Bus message metadata to the request using either HTTP headers or gRPC metadata.
145
146
In addition to the [settable metadata listed above](#sending-a-message-with-metadata), you can also access the following read-only message metadata.
146
147
147
148
- `metadata.DeliveryCount`
@@ -152,7 +153,9 @@ In addition to the [settable metadata listed above](#sending-a-message-with-meta
152
153
153
154
To find out more details on the purpose of any of these metadata properties, please refer to [the official Azure Service Bus documentation](https://docs.microsoft.com/rest/api/servicebus/message-headers-and-properties#message-headers).
154
155
155
-
> Note: that all times are populated by the server and are not adjusted for clock skews.
156
+
{{% alert title="Note" color="primary" %}}
157
+
All times are populated by the server and are not adjusted for clock skews.
0 commit comments