Container Apps Queue Scaling Configuration

Tim Sawyer 1 Reputation point
2022-06-08T21:22:24.413+00:00

I have a Container App set up to scale when a message arrives in a Service Bus Queue.

The Container App has a single docker image that is python based, and reads the next entry XML from the queue, creates a slideshow using ffmpeg-python, then terminates, scaling back to zero.

Rule name: queue-scale
Type: Azure queue
Queue name: slideshow
Queue length: 1
Secret Reference: service-bus-connection-string
Trigger parameter: container

I was expecting this to only run my docker image when there were items in the queue, but that isn't happening. Even when there is nothing in the queue the docker image is being spun up and run every five minutes or so:

5:19:01 PM
5:24:18 PM
5:29:37 PM
5:34:45 PM
5:40:03 PM
5:45:13 PM
5:50:27 PM
5:55:41 PM

Why is this?

Also, what is Trigger Parameter for? I can't find any explanation in the docs - can someone point one out? Thanks.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
579 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
325 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tim Sawyer 6 Reputation points
    2022-08-08T19:52:35.99+00:00

    For those following along, this is now sorted, thanks to @MughundhanRaveendran-MSFT for help.

    Although the original question was asked with a Service Bus, I am now using a Storage Queue.

    The problem was that my trigger parameter (the thing I couldn't find any explanation of!) needs to be "connection".

    To work this out I needed to read up on KEDA triggers - https://keda.sh/docs/2.7/scalers/azure-storage-queue/#authentication-parameters.

    1 person found this answer helpful.
    0 comments No comments