Logic App with Service Bus Peek Lock Trigger - Waiting Instances Start Lock Token Timer! Should be no waiting instances for SB

Simon Clendon 20 Reputation points
2023-08-10T23:25:47.2+00:00

Service: Azure Logic Apps (Standard and Consumption)

Issue: Service Bus Peek-Lock Trigger (Managed) - Waiting runs start lock token timer. There should be no waiting instances for Service Bus in my opinion - in fact, some new Logic Apps behave this way

Reproduction Steps:

  • Create Service Bus Topic subscription with Message Lock Duration of 60 seconds .
  • Find an older Logic App and add a workflow with a Service Bus Topic peek-lock trigger.
  • Add a delay action set to 20 seconds. Add Service Bus Completion action.
  • Set trigger Concurrency to 5.
  • Load Topic with 100 messages
  • Enable Logic App workflow
  • Observe five running instances and multiple waiting instances First set of running instances finish with duration of around 20 seconds (as expected) and waiting instances start running. Another set of waiting instances appear.
  • Second set of Running instances finish but duration is about 40 seconds. This indicates the lock token timer started when the instance was in Waiting state.
  • Subsequent completed instances have a longer and longer duration until the complete action can no longer find the lock token because it has expired.

Experiments:

  • I tried adding maximumWaitingRuns in Code view under runtimeConfiguration concurrency section. This has no effect.
  • Tried a workflow with an HTTP trigger and it did respect the maximumWaitingRuns setting.

Observations:

  • Lock token timeout timer starts running when workflow instance in Waiting state (not good!) Property maximumWaitingRuns does have an effect for HTTP triggers. This issue does not happen on newly created Logic Apps. This suggests a fix has been made somewhere. New Logic Apps, that don't display the Waiting instances behaviour, work as I would expect them to i.e., the workflow does not pull/peek messages from the Topic until a run bucket is available (this is good!).
  • Property maximumWaitingRuns is removed if workflow saved in Designer mode.

Questions

  1. Is this an issue that has recently been fixed, or a(n invalid) behaviour that has been removed?
  2. How do I fix existing Logic Apps with this issue?
Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
700 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Simon Clendon 20 Reputation points
    2023-09-19T19:33:52.7466667+00:00

    From product team:

    After further discussion with the product team, I am afraid that the product team can’t allow to set the maximumWaiting Runs=0, given we need to handle other scenarios like batch triggers with split on we might need to put some runs in the waiting queue.

    Hmm


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.