Reputation: 359
Is there a way to trigger Azure Function from queue and process messages batch by batch instead of item by item?
I have a lot of web jobs that use GroupQueueTrigger extension allowing me to read batch of 32 messages from the queue and process them in one run (this has a lot of advantages, f.e. speeds up inserts to Azure Table by using batch inserts, allows me to localy map-reduce messages before further processing, etc.). I want to rewrite these web jobs to Azure Function but I don't like to give up on batchwise processing.
Upvotes: 2
Views: 591
Reputation: 35154
Great question, but no, you can't.
Event Hubs trigger supports that (and it's the recommended way to use it), so maybe you could give that one a try?
UPDATE: There is an open-source library to add batching to Queue triggers. I haven't tried it myself, but give it a spin.
Upvotes: 1