Closed JSCProjects closed 2 years ago
@JSCProjects the scenario of hosting various triggers inside the same function app is fully supported. Could you share a repro to demonstrate the Isuzu?
also, the warning seems to be cut off.
@JSCProjects have you sorted it out? Please close the issue if it's resolved on your end. If not, then more details or a repro would help. Thank you.
I've downloaded this sample and altered EndpointName with one with dots. For example: ASB.Trigger.Queue. And then when I debug I get the following warnings (rider) in
and
That's because an ASB trigger function name cannot contain periods. Create a non-NSB specific ASB-triggered function and you'll have exactly the same issue:
public static class Function1
{
[FunctionName("Function1.Test")]
public static void Run([ServiceBusTrigger("ASB.Trigger.Queue", Connection = "AzureWebJobsServiceBus")]string myQueueItem, ILogger log)
{
log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
}
}
You can fix this by overriding the function trigger name:
[assembly: NServiceBusTriggerFunction(endpointName: Startup.EndpointName, TriggerFunctionName = "trigger-function-name")]
Sorry but still no running function with ASB
Mate, share a repro. We can continue playing cat and mouse forever or look at the same code and determine what's wrong and where. Thanks.
Sorry @SeanFeldman here is a [service-bus_asbfunctions_jsc.zip](https://github.com/Particular/NServiceBus.AzureFunctions.InProcess.ServiceBus/files/7425015/service-bus_asbfunctions_jsc.zip
The zip file is the sample project straight from the sample, just with custom queue and trigger function names 🙂 I'm sorry, but it just works...
There's something either off with the environment where you develop or your computer is sending a clear signal it's ready to retire and you should let it go, @JSCProjects.
Hmm strange! I receive the following warning when I build the solution on this computer.
CSC : warning CS8032: An instance of analyzer NServiceBus.AzureFunctions.SourceGenerator.TriggerFunctionGenerator2 cannot be created from C:\Users\JoeyChömpff\.nuget\packages\nservicebus.azurefunctions.inprocess.servicebus\2.0.2\analyzers\dotnet\cs\NServiceBus.AzureFunctions.SourceGenerator.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
So I tried it with another computer and then it works.
There's something either off with the environment where you develop or your computer
That's not the code. The issue can be closed 🙂
I'm hosting HttpTrigger and NServiceBusTriggerFunction inside the same host, but the host doesn't recognize the both functions. So therefore I switched back to the hardcoded variant, but with that I get a warning "Process(Message, ExecutionContext, IMessageReceiver, ILogger)"
"NServiceBus.AzureFunctions.InProcess.ServiceBus" Version="1.3.0"