azure-webjobs

Is it possible to use an Azure Web Job to listen on a public socket

百般思念 提交于 2021-01-28 09:57:50
问题 Can an Azure Web Job listen on a public TCP port (socket) I am deploying a Web Application to Azure, and it has a long running Web Job that listens to a TCP port (a custom protocol is involved, so a raw socket is required) The listener runs, but I want to send data from outside of Azure, from another on-prem machine. The port is listening OK, it can open an incoming socket, but it is internal (10.0.X.X) I suspect a public port like this is NOT possible, but I want to be 100% sure of that

Visual Studio 2019 - Adding WebJob project in WebApp

房东的猫 提交于 2021-01-28 05:36:08
问题 In my solution i have an aspnet core 2.2 WebApp, and i want to add an existent project like webJob but there isn't the option: Add WebJobs from existent project Why? With the same procedure i add WebJobs on my other .Net application, and this option is shown in visual studio 2019 EDIT Changed images with english language. Sometimes the Add > Existing project as Azure WebJobs it's showned but if I click on it it shows this error: (the selected project is the aspnet.core 2.2. WebApp) After this

Azure WebJobs: Can't find Trace logging

好久不见. 提交于 2021-01-27 07:51:35
问题 I've followed the instructions on this Microsoft webpage for logging messages from an Azure WebJob, but none of my messages appear in the log. In my WebJob I write logging messages using Trace.TraceInformation("blah blah blah"); In the configuration file's application diagnostics section I have blob storage logging turned on with the "Verbose" option. Log files are being created (though I sometimes have to wait several minutes - in one case until the following morning - until the logs appear

Azure WebJobs: Can't find Trace logging

核能气质少年 提交于 2021-01-27 07:48:16
问题 I've followed the instructions on this Microsoft webpage for logging messages from an Azure WebJob, but none of my messages appear in the log. In my WebJob I write logging messages using Trace.TraceInformation("blah blah blah"); In the configuration file's application diagnostics section I have blob storage logging turned on with the "Verbose" option. Log files are being created (though I sometimes have to wait several minutes - in one case until the following morning - until the logs appear

Using multiple Azure Functions QueueTriggers to listen on the same storage queue

与世无争的帅哥 提交于 2021-01-20 11:43:37
问题 I have an Azure Functions QueueTrigger that listens on a storage queue for messages like this: Message text -------------------------- {"ClientName": "client1"} {"ClientName": "client2"} {"ClientName": "client3"} The QueueTrigger then has code like this: if 'client1' == queue_msg['ClientName']: # do work required for client1 elif 'client2' == queue_msg['ClientName']: # do work required for client2 elif 'client3' == queue_msg['ClientName']: # do work required for client3 I'm using the Linux

Using multiple Azure Functions QueueTriggers to listen on the same storage queue

懵懂的女人 提交于 2021-01-20 11:42:46
问题 I have an Azure Functions QueueTrigger that listens on a storage queue for messages like this: Message text -------------------------- {"ClientName": "client1"} {"ClientName": "client2"} {"ClientName": "client3"} The QueueTrigger then has code like this: if 'client1' == queue_msg['ClientName']: # do work required for client1 elif 'client2' == queue_msg['ClientName']: # do work required for client2 elif 'client3' == queue_msg['ClientName']: # do work required for client3 I'm using the Linux

Servicebustrigger deserialization fails

丶灬走出姿态 提交于 2021-01-07 02:41:50
问题 I have a simple webjob that use servicebus: public async Task ProcessQueueMessage([ServiceBusTrigger("asset-updates-in")] BrokeredMessage message, ILogger log) { log.LogInformation("Running job"); log.LogInformation("GotMessage"+ message.ContentType); Message is sent by Biztalk team, has a mime type 'text/xml' And looks like this: <gip:GetDeviceUpdateResult xmlns:gip="http://schemas.ores.net/customer/breakdown-manager/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <gip:Event>

Publish Azure Function as NuGet package (or load function from external assembly)

老子叫甜甜 提交于 2020-12-15 05:44:05
问题 I'm looking into publishing a reusable Azure Function as a NuGet package, in order to easily consume it in other projects. This way I can reference the NuGet package in other projects. This way I could dynamically compose a set of Azure Functions to be deployed to an Azure Function service. Is this currently possible? Or, can functions e.g. be defined in an external assembly, and be "picked up" by the Azure Function host? I know this is possible with Azure WebJobs, but I haven't found a way

How to use HostBuilder for WebJob?

二次信任 提交于 2020-12-08 05:42:30
问题 With .Net 2.0 was introduced the really usefull HostBuilder for Console App like we have with WebHostBuilder for Web Application. My concern is now how to implement the HostBuilder with WebJob with a QueueTrigger? Until now, I was using JobActivator: var startup = new Startup(); var serviceProvider = startup.ConfigureServices(new ServiceCollection()); startup.Configure(serviceProvider); var jobHostConfiguration = new JobHostConfiguration() { JobActivator = new JobActivator(serviceProvider), }

How to make sure a queue message has been successfully processed in Azure Functions?

爷,独闯天下 提交于 2020-12-07 05:14:13
问题 I have a C# Azure Functions (on the App Service plan) app built that uses HTTP Triggers and Queue Triggers. The application works by installing a script on a client's machine that pulls various files from a client database using SQL queries moving that output to a temporary Azure Blob Storage. After each file is completed an HTTP trigger is called that creates a queue message for the Queue Trigger to pick up the message and move the files from the temporary blob storage to a permanent spot in