Adding initialVisibilityDelay option to Azure Storage Queue binding#3820
Merged
Adding initialVisibilityDelay option to Azure Storage Queue binding#3820
Conversation
…omponent Signed-off-by: Will Velida <willvelida@hotmail.co.uk>
| type QueueHelper interface { | ||
| Init(ctx context.Context, metadata bindings.Metadata) (*storageQueuesMetadata, error) | ||
| Write(ctx context.Context, data []byte, ttl *time.Duration) error | ||
| Write(ctx context.Context, data []byte, ttl *time.Duration, initialVisibilityDelay *time.Duration) error |
Contributor
There was a problem hiding this comment.
If this value is passed as a parameter but isn't expected to change dynamically, I suggest making it a struct property in the types that implement this interface.
Contributor
Author
There was a problem hiding this comment.
After setting the default value to 0, I was thinking that if we keep it as a parameter, consumers can configure it on a per-message basis and it keep some consistency with the ttl parameter. I'm also think that using a struct here could introduce race conditions with the binding.
…ests and formatting metadata Signed-off-by: Will Velida <willvelida@hotmail.co.uk>
nelson-parente
approved these changes
Jun 25, 2025
cicoyle
approved these changes
Jun 25, 2025
mikeee
pushed a commit
to mikeee/dapr_components-contrib
that referenced
this pull request
Jun 27, 2025
…apr#3820) Signed-off-by: Will Velida <willvelida@hotmail.co.uk> Co-authored-by: Yaron Schneider <schneider.yaron@live.com> Co-authored-by: Cassie Coyle <cassie@diagrid.io>
sicoyle
pushed a commit
to sicoyle/components-contrib
that referenced
this pull request
Jul 7, 2025
…apr#3820) Signed-off-by: Will Velida <willvelida@hotmail.co.uk> Co-authored-by: Yaron Schneider <schneider.yaron@live.com> Co-authored-by: Cassie Coyle <cassie@diagrid.io>
passuied
pushed a commit
to passuied/components-contrib
that referenced
this pull request
Feb 14, 2026
…apr#3820) Signed-off-by: Will Velida <willvelida@hotmail.co.uk> Co-authored-by: Yaron Schneider <schneider.yaron@live.com> Co-authored-by: Cassie Coyle <cassie@diagrid.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the
initialVisibilityDelayoption for Azure Queue Storage Binding. This feature allows setting a delay before a message becomes visible in the queue after being added, which is a functionality available in the Azure Storage Queue service.The implementation includes:
InitialVisibilityDelayfield to thestorageQueuesMetadatastruct with appropriate mapstructure tagsQueueHelperinterface to include the initialVisibilityDelay parameter in the Write methodAzureQueueHelper.Writeimplementation to use the initialVisibilityDelay parameter when calling EnqueueMessageAzureStorageQueues.Invokemethod to extract initialVisibilityDelay from request metadataTestWriteWithInitialVisibilityDelaythat verifies the initialVisibilityDelay parameter is correctly passed from the request metadata to the Write methodIssue reference
This PR will close #3555
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: