cookie-cutter
cookie-cutter copied to clipboard
Automatically Manage Visibility Window for Azure Queues
The Azure Queues input source should automatically increase the visibility window if the release
callback for the input message wasn't received in time to give the service more time to process the message and prevent the message from being double-processed by another instance of the same service.
@sklose is this something other queue libraries do? Automatically extending a visibility window on a message feels like it could get hairy. If the underlying event handler is locked up and never to return would we continue to push this message on?
Just wondering maybe if no other queue libraries do this, either we dont need to or they have a reason for it?
We can def define an upper limit, so if something hangs it would not block the queue item indefinitely. Extending the window has another advantage though ... lets say you usually need 10 minutes to process each message from the queue. You can set the default visibly timeout to say 15 minutes to prevent messages from being picked up by multiple services. On failover it will take up to 15 minutes though for the message to get picked up again. If you keep extending the window let's say every 30s by 1 minute then the queue item would be reprocessed much faster.