From 3aec7294d0d001c1e96fdbfb5d7c57655e8bae9c Mon Sep 17 00:00:00 2001 From: Marc Bischof Date: Mon, 23 Feb 2026 11:05:05 +0100 Subject: [PATCH] Add visibility timeout configuration to AzureQueueStorage --- Classes/Queue/AzureQueueStorage.php | 9 +++++++++ README.md | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Classes/Queue/AzureQueueStorage.php b/Classes/Queue/AzureQueueStorage.php index 082a61c..675177d 100644 --- a/Classes/Queue/AzureQueueStorage.php +++ b/Classes/Queue/AzureQueueStorage.php @@ -41,8 +41,16 @@ class AzureQueueStorage implements QueueInterface protected string $containerName; + /** + * Polling timeout (how long to wait for a message) + */ protected int $defaultTimeout = 30; + /** + * Visibility timeout (how long message stays hidden during processing) + */ + protected int $visibilityTimeout = 300; + /** * Message size threshold for claim check pattern (in bytes) * Azure Storage Queue messages have a max size of 64KB @@ -685,6 +693,7 @@ private function tryReceiveOnce(): ?AzureQueueStorageMessage try { $listMessagesOptions = new ListMessagesOptions(); $listMessagesOptions->setNumberOfMessages(1); + $listMessagesOptions->setVisibilityTimeoutInSeconds($this->visibilityTimeout); /** * @var QueueMessage[] $queueMessages diff --git a/README.md b/README.md index 463cb29..1d57057 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,8 @@ Flowpack: executeIsolated: true options: connectionString: DefaultEndpointsProtocol=https;AccountName=myaccountname;AccountKey=myaccountkey;EndpointSuffix=core.windows.net - defaultTimeout: 30 # Default timeout in seconds + defaultTimeout: 30 # Default polling timeout in seconds (how long to wait for a message) + visibilityTimeout: 300 # Default visibility timeout in seconds (how long message stays hidden during processing), note that this must exceed the maximum expected job duration claimCheckThreshold: 32768 # Message size threshold for claim check pattern (in bytes) defaultTtl: 604800 # Default message TTL in seconds (7 days max for Azure Storage Queue) pollingInterval: 1000 # Polling interval in milliseconds