fsprojects / FSharp.CloudAgent

Allows running F# Agents in a distributed manner using Azure Service Bus.
http://fsprojects.github.io/FSharp.CloudAgent/
The Unlicense
39 stars 14 forks source link

Allow arbitrary message lock extension #7

Open AndyCross opened 9 years ago

AndyCross commented 9 years ago

On long running tasks it is necessary to extend visibility timeouts to prevent them being incorrectly redelivered.

To achieve this you need either the CloudQueueMessage in scope, or the MessageId or SequenceNumber and also LockToken in order to use raw REST API.

via .NET client you'd do this: https://msdn.microsoft.com/en-us/library/azure/microsoft.windowsazure.storage.queue.cloudqueue.updatemessage.aspx

via REST you'd do this: https://msdn.microsoft.com/en-us/library/azure/jj839746.aspx

Since the CloudAgent paradigm abstracts away some of these details, a long running agent will incorrectly have the same message delivered multiple times.

It could be that a "ReplyChannel Extend" type operation is a relevant solution.