How to get an Azure Webjob to process multiple queue messages?

落花浮王杯 提交于 2021-02-08 07:37:47

问题


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:


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.



来源:https://stackoverflow.com/questions/35001148/how-to-get-an-azure-webjob-to-process-multiple-queue-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!