Azure / azure-functions-servicebus-extension

Service Bus extension for Azure Functions
MIT License
65 stars 35 forks source link

MaxMessageBatchSize Service bus queue trigger for Functions - question #216

Open lugospod opened 1 year ago

lugospod commented 1 year ago

Trying to find out how batching works between Service bus queue and Azure functions. Azure function has IsBatched property and Service Bus Queue has MaxMessageBatchSize property. The maximum number of messages that will be passed to each function call. This setting only applies to functions that receive a batch of messages.

But there is no information on how this process works under the hood.

I would like to avoid calling the function for each message but would like to have the flexibility to define how long the queue is allowed to wait before notifying me about messages that were received so far (up to MaxMessageBatchSize).

On Service Bus github I got a response: "The ASB SDK, used to implement Functions ASB trigger doesn't wait for that exact number of messages. This number indicates how many messages will be sent down to the function at-most. The server will provide whatever it has." so now I am trying my luck here - or if you could point me in the right direction if this is not the right place for this question.

Tnx! Luka