Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What run mode should be used for ServiceBus triggered WebJob?

I have a WebJob that has is meant to be triggered whenever a ServiceBus queue item shows up

public static void ProcessQueueMessage(
    [ServiceBusTrigger("%ServiceBusHighPriorityQueueName%")] BrokeredMessage message)

Some sites state the following

  • Continuous: A WebJob that will be always running
  • Triggered: A WebJob that is run on-demand when an API call is made or on when a scheduled condition is reached.

I assume ServiceBus queue trigger handler is "Triggered" instead of "Continuous", so what should be used when setting the webjob-publish-settings.json parameter runMode?

Since it is triggered, does the AppService still need to be AlwaysOn?

like image 727
RichardTheKiwi Avatar asked Apr 28 '17 00:04

RichardTheKiwi


1 Answers

When using the WebJobs SDK with a host that blocks, the WebJobs needs to be set as continuous, even though from the point of view of individual functions, they behave as if they are triggered.

Basically, continuous is correct whenever you have an exe that runs forever, and that is the case here.

And of course, do do need to have Always On enabled.

like image 130
David Ebbo Avatar answered Sep 19 '22 18:09

David Ebbo