Search code examples
azureazure-webjobsazure-servicebus-queues

Azure App Service consumes service bus queue messages even though it's stopped


I have a service bus queue (partitions and session-enabled) from which a webjob inside an app service is consuming messages. I received an exception whereafter the actual processing of the messages stopped, but not the consuming of the messages from the queue.

I then

  1. stopped the webjob
  2. stopped the app service
  3. inactivated the queue
  4. checked for running processes under Kudu - none related to my webjob

but still messages are consumed

Do I really have to delete the container (App Service)? (Which I don't want to do since there are several webjobs running on it, and thus, several deployment flows.)

If anyone have experienced the same or if any light could be shed, by anyone, I would be grateful.

best regards


Solution

  • As long as the service/web job is down that means your queue messages are not consumed by this resource.

    I would suggest you look for:

    1. Different environments (like test/staging) that your web job is running but due to mis-configuration they subscribe to the wrong queue and consume your messages.
    2. Running the application locally you or any colleague of yours. Azure by default has very weak policies regarding access policies. You can by default connect to azure service bus by your local environment.
    3. Messages in a queue expire. In azure service bus default TTL (time to live) is 14 days. In this case you will se messages disappear but that does not mean that they are consumed.