I wrote a durable function that works great to handle incoming JSON data and put it into a queue for processing. (I got Table storage working too.) My problem is with the Azure function that handles the queue trigger, where one of my functions isn't being recognized. My full code is currently 200 lines so here's an over-simplified example:
namespace My.Namespace
{
public static class Test
{
[FunctionName("Main")]
public static async void Run([QueueTrigger("queue", Connection = "myinfo_STORAGE")] MyItem Item, ILogger log)
{
await DoSomethingElse("Information");
}
[FunctionName("DoSomething")]
public static async Task Run(string msg, ILogger log)
{
// code to do something
return;
}
}
}
Where I try to do the await, it's telling me The name 'DoSomething' does not exist in the current context. I don't understand - it's in the same class & namespace, and this works fine in my durable functions orchestration project. However, I note that in my durable functions orchestration project, durable functions have a context, like so:
[OrchestrationTrigger] IDurableOrchestrationContext context,
And then we use the context to do async work like:
string res = await context.CallActivityAsync<string>("AddSomeData", data);
Where AddSomeData is defined like:
[FunctionName("AddSomeData")]
public static async Task<Strin> Run(string data, ILogger log)
{
// do work
return "OK";
}
There doesn't seem to be a context for QueueTrigger in the same way as there is for durable function orchestration. What am I missing?
(I'm a VB.NET WinForms programmer transitioning to Azure functions with C#.)