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.
This is now available in the latest Service Bus trigger version: https://github.com/Azure/azure-functions-servicebus-extension/issues/15
Just tracking another issue to ensure can be leveraged outside of .NET https://github.com/Azure/azure-functions-servicebus-extension/issues/65
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.
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.
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.