0
votes

My function in my azure webjobs (console app) is doing its job correct and grabbing messages from my queue, but I need a way to control the "time visible" option or the ability to delete the message from the queue once it gets picked up.

Function:

public class Functions
{
    public static void MultipleOutput([QueueTrigger("messages")] MessageQueueItem message, TextWriter log)
    {
        Console.WriteLine("Item Found [{0}]! Process starting", message.VideoId);

        ResolverAgent agent = new ResolverAgent(message);
        agent.Process();
    }
}

I know that when you access a queue programmatically, it's a parameter you pass in. However I'm not accessing it that way. What is the correct way of doing this using the azure sdk in a webjobs application?

Edit:

The visiblity option is the time from when a job picks up a message from the queue and the time the message reappears back on the queue (because the process hasn't finished yet and assumes it failed). In my case, the default 30 seconds is not enough time for the process to run all the way through.

Reference (section: How to: Leverage additional options for de-queuing messages): http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-queues/

1
What do you mean by "time visible"? Can give more details about what you are trying to achieve?Victor Hurdugaci
editted for more informationSherman Szeto

1 Answers

1
votes

Is your function is still processing the message, the webjobs SDK will update the lease so another function doesn't pick it up.