docs.particular.net
docs.particular.net copied to clipboard
Feedback: Azure Functions Isolated Worker configuration documentation is (at best) misleading
Feedback for 'Isolated Worker' https://docs.particular.net/nservicebus/hosting/azure-functions-service-bus/isolated-worker
Location in GitHub: https://github.com/Particular/docs.particular.net/blob/master/nservicebus/hosting/azure-functions-service-bus/isolated-worker.md
The configuration documentation here is misleading at best, and may just be wrong. It says that endpoint name can be loaded from ENDPOINT_NAME in configuration but that doesn't apear to be true or it's not really shown how you would do that. The docs for ENDPOINT_NAME say:
Optional. By default, the endpoint name is derived from the NServiceBusTriggerFunction attribute.
But the NServiceBusTriggerFunction requires the endpointName parameter, it can't be skipped.
In https://discuss.particular.net/t/why-custom-trigger-definitions-not-supported-for-isolated-worker/2999/17 it was found that you could do [NServiceBusTriggerFunction("%ENDPOINT_NAME%")] which uses Microsoft parameter binding, but then the source generator (which is not aware of this) will create an endpoint name that includes a % in the middle, so you have to do this instead:
[assembly:NServiceBusTriggerFunction("%ENDPOINT_NAME%", TriggerFunctionName = “MyFunctionName”)]
But none of it is clear.
Also related: The source generator should be made to be properly aware of bindings and act accordingly.