Skip to content

Updating storage queue binding doc to include initialVisibilityDelay parameter #4689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: v1.16
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
# value: "http://127.0.0.1:10001"
# - name: visibilityTimeout
# value: "30s"
# - name: initialVisibilityDelay
# value: "30s"
# - name: direction
# value: "input, output"
```
Expand All @@ -59,7 +61,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| `decodeBase64` | N | Input | Configuration to decode base64 content received from the Storage Queue into a string. Defaults to `false` | `true`, `false` |
| `encodeBase64` | N | Output | If enabled base64 encodes the data payload before uploading to Azure storage queues. Default `false`. | `true`, `false` |
| `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"` |
| `visibilityTimeout` | N | Input | Allows setting a custom queue visibility timeout to avoid immediate retrying of recently failed messages. Defaults to 30 seconds. | `"100s"` |
| `initialVisibilityDelay` | N | Input | Allows setting a custom queue visibility timeout to avoid immediate retrying of recently failed messages. Defaults to 30 seconds. | `"100s"` |
| `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"` |
| `direction` | N | Input/Output | Direction of the binding. | `"input"`, `"output"`, `"input, output"` |

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

## Specifying a Initial Visibility delay per message

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.

To set an initial visibility delay value at the message level, use the `metadata` section in the request body during the binding invocation.

The field name is `initialVisbilityDelay`.

Example.

```shell
curl -X POST http://localhost:3500/v1.0/bindings/myStorageQueue \
-H "Content-Type: application/json" \
-d '{
"data": {
"message": "Hi"
},
"metadata": {
"initialVisbilityDelay": "30"
},
"operation": "create"
}'
```

## Related links

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