How can we improve Microsoft Azure Functions?

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.

41 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Chris Clarke shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Nicols commented  ·   ·  Flag as inappropriate

        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  ·   ·  Flag as inappropriate

        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  ·   ·  Flag as inappropriate

        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.

      Feedback and Knowledge Base