Azure Webjobs has no working features

Trying to get Azure Webjobs to respond to an incoming Service Bus event, I fire this by pressing F5. I get an error on startup.

No jobs found. Try to make your classes and public work methods. If you are using binding extensions (e.g. ServiceBus, Timers, etc.), make sure you call the registration method for the extension in your startup code (e.g. config.UseServiceBus (), config.UseTimers (), etc. .).

My function class is as follows:

   public class Functions
    {
        // This function will get triggered/executed when a new message is written 
        // on an Azure Queue called queue.
        public static void ProcessQueueMessage([ServiceBusTrigger("test-from-dynamics-queue")] BrokeredMessage message, TextWriter log)
        {
            log.WriteLine(message);
        }
    }

I have all the classes and methods set for public

I call config.UseServiceBus();in the program.cs file

I am using Microsoft.Azure.WebJobs v 1.1.2

(( , AzureWebJobsDashboard- AzureWebJobsStorage-connectionstrings, Azure Azure. , ))

+4
1

, , config JobHost. , .

JobHost  host = new JobHost(config)

, Azure Service Bus SDK WebJobs, . .

public class Program
{
   public static void Main()
   {
      JobHostConfiguration config = new JobHostConfiguration();
      config.UseServiceBus();
      JobHost host = new JobHost(config);
      host.RunAndBlock();
   }
}
+21

Source: https://habr.com/ru/post/1667929/


All Articles