The Managed Service Bus connector used by the Standard Logic Apps has the Maximum Message Count
parameter in the When one or more messages arrive in a queue (peek-lock)
trigger.
The built-in Service Bus connector used by the Standard Logic Apps doesn't have this parameter in the When messages are available in a queue (peek-lock)
trigger. With thousands of messages in the queue, it gets 1,000 messages in one go.
The Split On
setting is switched off, and my problem is that the Logic App cannot process 1,000 messages within 5 minutes (the maximum message lock duration that can be set in the Service Bus queue).
Main question: Is there any way to limit the maximum number of messages that can be received by the built-in When messages are available in a queue (peek-lock)
trigger in Standard Logic Apps? I didn't find anything helpful in the Reference for app settings - local.settings.json.
Bonus question: How else can we get and process thousands of Service Bus messages in a Standard Logic App using the built-in connector, if the message lock duration is set to the maximum allowed value (5 minutes), and the max delivery count is set to 3 - then the messages are moved the dead-letter queue.
Limitations:
My only idea is switching to the Recurrence
trigger and having a loop with the Get messages from a queue
action there - it does have the Maximum Number Of Messages
parameter. If this is your suggestion as well, no need to post it as an answer. :)
If possible, I want to stick to using the When messages are available in a queue (peek-lock)
trigger.
In the past three months, Microsoft must have released an update to the built-in Service Bus connector that addresses this issue. The built-in connector's When messages are available in a queue (peek-lock)
trigger now also has the maxMessageBatchSize
parameter: