Skip to content

Commit add226c

Browse files
Updating storage queue binding doc to include initialVisibilityDelay parameter (#4689)
Signed-off-by: velidawill <velidawill@microsoft.com> Co-authored-by: Mark Fussell <markfussell@gmail.com>
1 parent 4039056 commit add226c

File tree

1 file changed

+28
-1
lines changed
  • daprdocs/content/en/reference/components-reference/supported-bindings

1 file changed

+28
-1
lines changed

daprdocs/content/en/reference/components-reference/supported-bindings/storagequeues.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ spec:
3939
# value: "http://127.0.0.1:10001"
4040
# - name: visibilityTimeout
4141
# value: "30s"
42+
# - name: initialVisibilityDelay
43+
# value: "30s"
4244
# - name: direction
4345
# value: "input, output"
4446
```
@@ -59,7 +61,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr
5961
| `decodeBase64` | N | Input | Configuration to decode base64 content received from the Storage Queue into a string. Defaults to `false` | `true`, `false` |
6062
| `encodeBase64` | N | Output | If enabled base64 encodes the data payload before uploading to Azure storage queues. Default `false`. | `true`, `false` |
6163
| `endpoint` | N | Input/Output | Optional custom endpoint URL. This is useful when using the [Azurite emulator](https://github.com/Azure/azurite) or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. | `"http://127.0.0.1:10001"` or `"https://accountName.queue.example.com"` |
62-
| `visibilityTimeout` | N | Input | Allows setting a custom queue visibility timeout to avoid immediate retrying of recently failed messages. Defaults to 30 seconds. | `"100s"` |
64+
| `initialVisibilityDelay` | N | Input | Allows setting a custom queue visibility timeout to avoid immediate retrying of recently failed messages. Defaults to 30 seconds. | `"100s"` |
65+
| `visibilityTimeout` | N | Input | Sets a delay before a message becomes visible in the queue after being added. It can also be specified per message by setting the `initialVisibilityDelay` property in the invocation request's metadata. Defaults to 0 seconds. | `"30s"` |
6366
| `direction` | N | Input/Output | Direction of the binding. | `"input"`, `"output"`, `"input, output"` |
6467

6568
### Microsoft Entra ID authentication
@@ -98,6 +101,30 @@ curl -X POST http://localhost:3500/v1.0/bindings/myStorageQueue \
98101
}'
99102
```
100103

104+
## Specifying a Initial Visibility delay per message
105+
106+
An initial visibility delay can be defined on queue level or at the message level. The value defined at message level overwrites any value set at a queue level.
107+
108+
To set an initial visibility delay value at the message level, use the `metadata` section in the request body during the binding invocation.
109+
110+
The field name is `initialVisbilityDelay`.
111+
112+
Example.
113+
114+
```shell
115+
curl -X POST http://localhost:3500/v1.0/bindings/myStorageQueue \
116+
-H "Content-Type: application/json" \
117+
-d '{
118+
"data": {
119+
"message": "Hi"
120+
},
121+
"metadata": {
122+
"initialVisbilityDelay": "30"
123+
},
124+
"operation": "create"
125+
}'
126+
```
127+
101128
## Related links
102129

103130
- [Basic schema for a Dapr component]({{< ref component-schema >}})

0 commit comments

Comments
 (0)