[FEATURE REQ] Add visibility timeout option to Spring Integration for Azure Storage Queue
Closed this issue · 5 comments
Is your feature request related to a problem? Please describe.
Currently the StorageQueueMessageSource
from spring-integration-azure-storage-queue does not provide any provision to configure Visibility Timeout. When it calls readAsync on StorageQueueTemplate
the visibility timeout is hardcoded to null at the moment which means default visibility timeout of 30 seconds with no option to configure it.
This is a problem when using StorageQueueMessageSource
in a spring integration solution along with @InboundChannelAdapter
of spring-integration.
If one has multiple instances of spring-integration app - then it becomes unusable.
It may take a few minutes to process a message from an azure storage queue. If the visibility timeout is not configurable and hard coded to 30 seconds, then one cannot prevent other instances of the app from picking up the message from the queue since the message will become visible to other consumers after 30 seconds.
Earlier this used to be configurable when StorageQueueMessageSource
was used with StorageQueueOperation
. However, in the current avatar, when StorageQueueTemplate
was introduced - this configurability went missing from StorageQueueMessageSource
which seems like missing functionality.
Describe the solution you'd like
The solution would be to have an extra parameterized constructor to StorageQueueMessageSource
that would accept a visibility timeout value as well. The existing constructor would be retained for backward compatibility and would continue to use the default visibility timeout
I have already implemented and tested the change. Shall open a PR for it.
Describe alternatives you've considered
An alternative would be for app users to use StorageQueueTemplate
from spring-messaging-azure-storage-queue directly but that would defeat the purpose of StorageQueueMessageSource
which is more of a spring-integration module.
Additional context
Add any other context or screenshots about the feature request here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Description Added
- Expected solution specified
FYI @yiliuTo
Pull Request: #29567
Hi @soumabrata-chakraborty thanks for the contribution, I will review it
Hi @soumabrata-chakraborty the pr has been merged and you can look forward to our next release which is expected to be published in this month.
Hi @yiliuTo thank you for your support and help on this.