-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure Functions Preview on .NET 5 #131
Comments
Thank you, @johnkors, for raising the question. Azure Functions out-of-process worker is not GA-ed and is not possible to run in production. Isn't that the case? It also doesn't even support all the standard triggers currently as stated in What's your current use case, and how would you use it given the information above? Thank you. |
My use case is I'm working in a .NET 5 code base, so ideally the function would also be running 5 instead of 3.1. I by chance used C# records instead of classes to define my message contracts, which are not supported in 3.1. Not big issue to convert to classes and use 3.1 functions, just wanted to investigate if it was feasible to run on the preview first. FWIW, I got a Function sample up with ServiceBusBinding on 5 that triggers fine, but currently lack a way of getting hold of MessageId/Headers to pass to the NServiceBus bridge (IFunctionEndpoint.Process). Not critical, just wondered if you had looked at the previews and had some pointers. Totally understandable if you want to wait for GA. |
Btw, for anyone other than me interested, my current hacks are: .ConfigureFunctionsWorker((_, b) =>
{
b.Services.AddSingleton<IFunctionEndpoint,FunctionEndpoint>(
a => new FunctionEndpoint(b => new ServiceBusTriggeredEndpointConfiguration("My.Functions", "ASB_CONNECTIONSTRING")));
b.UseFunctionExecutionMiddleware();
}) // from microsoft.azure.functions.worker/1.0.0-preview3
using FunctionExecutionContext = Microsoft.Azure.Functions.Worker.Pipeline.FunctionExecutionContext;
[FunctionName("PreviewTest")]
public Task Run(
[ServiceBusTrigger("My.Functions", Connection = "ASB_CONNECTIONSTRING")] string body,
FunctionExecutionContext context)
{
var endpoint = context.InstanceServices.GetService<IFunctionEndpoint>();
endpoint.Process(..);
} Unfortunately it only works to define the |
Given how in-flux the support for out-of-process Functions is the ideal situation would be to let the dust settle on the Functions side and then look into adopting it for NServiceBus. Functions API can and will change, causing continuous catch-up. I also haven't seen a solid answer about supporting .NET 5 in production. Rather, an answer that this work is done to ensure .NET 6 is a smooth sail. On the NServiceBus side, you have a guarantee that when Functions API changes are solid, the support for those will be added. |
The issue to support the upcoming isolated worker will be tracked in Particular/NServiceBus.AzureFunctions.Worker.ServiceBus#148 |
Will do, thanks! |
Hi,
Any thoughts on how to get an endpoint working with the new Azure Functions SDK (for .NET 5 support)?
See https://github.com/Azure/azure-functions-dotnet-worker-preview
The text was updated successfully, but these errors were encountered: