1
votes

In Azure worker roles, you can create a batch job that processes a list of messages. I'm wondering if there is something similar to that for Azure WebJobs?

Currently you can trigger a webjob from a queue as follows:

public static void ProcessQueueMessage([QueueTrigger("queue")] string message, TextWriter log)

Is there some way to pull and process a list of messages?

1
There's a backlogged feature request. Chime in if you'd like to see it. github.com/Azure/azure-webjobs-sdk/issues/625Sean Feldman

1 Answers

2
votes

No, there is no inbuilt binding for a batch of Queue messages currently.

However, someone in the community has recently created such a binding using the WebJobs SDK extensibility model. I have not used that binding yet, but you might give it a try and provide feedback to the author. See the GroupQueueTrigger repo and more information. It allows you to bind to a List<T> of messages.