Handle Storage Queue/Service Bus messages in batches
I want to be able to handle multiple messages per function call - we are using a third-party web service which works much more efficiently if the messages are passed to it in batches. I know we could use a timer to trigger the function and grab messages from the queue ourselves but if we do that the function won't scale out automatically.

Leaving as started becasue we don’t have full docs out yet but this is completed. Just need to document and provide samples
3 comments
-
Nicols commented
I am considering event hub just because topics dont support this feature. I believe this is very important if we want the functions to be used efficiently with service bus.
-
Nicolas commented
I am considering moving to event hub to be able to run transactions in batches. It would be very convenient to set prefetch, and them use message[] for the trigger binding in the function.
-
JeffC commented
I can see how this would be useful in some situations. I guess you'd have to have a setting for the max number of items to fetch from SB. Then your main function method (Run) would need to have the arguments expect a list of message objects.