-
Notifications
You must be signed in to change notification settings - Fork 3
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
New AzureServiceBusTransport Constructor Not Setting Fully Qualified Namespace when Injecting an IFunctionEndpoint #369
Comments
Hello, any update on this? |
Hey @sanfordn, When using Azure Functions, I don't believe you get to directly instantiate the transport yourself due to how the triggers work. Note the known constraints and limitations section of the docs, how it says calling Is it possible to do what you're trying to do using the |
Previously in NServiceBus.AzureFunctions.Worker.ServiceBus v4.0.0-rc.2, we were able to do this: configuration.Transport.TokenCredential = new DefaultAzureCredential(); But it doesn't look like anything like that is available anymore. |
@sanfordn I've done a bit of digging and it just appears as though this package isn't set up to support managed identity yet. There's already an issue #368 raised to support that as a feature. Given that the known constraints of calling UseTransport() are not supported this isn't really a bug, it's a currently unsupported feature. I would encourage you to follow #368 for udpates. We regularly do enhancements on our Azure-related packages so I'll suggest that as a for the next iteration. |
Thanks for taking a look, I'll keep my eye on it! |
Describe the bug
Description
Within the UseNServiceBus() configuration section, we are using the "newer" constructor for building an AzureServiceBusTransport with a DefaultAzureCredential token. We followed the steps in the documentation for moving from Version 2 to Version 3 as it was specifically called out how we can specify a DefaultAzureCredential as the TokenCredential.
It seems to build the EndpointConfiguration just fine when inside of our startup file, but once we get to our Sender, it puts the Fully qualified service bus name into the ConnectionString property of the IFunctionEndpoint implementation.
Expected behavior
When using the constructor where you can specify a fully qualified namespace, the FullyQualifiedNamespace hosts whatever value is passed into it throughout the lifetime of the service.
Actual behavior
Once we get into the Sender, the FullyQualifiedNamespace variable is empty in the EndpointConfiguration, and we get an error after we do a RouteToThisEndpoint() and IFunctionEndpoint.Send() saying
The value '' is not a well-formed Service Bus fully qualified namespace. (Parameter 'fullyQualifiedNamespace
. And the FullyQualifiedNamespace value that we passed in the Startup is inside the ConnectionString propertyVersions
NServiceBus.AzureFunctions.Worker.ServiceBus 4.1.0
Please list the version of the relevant packages or applications in which the bug exists.
Steps to reproduce
Configure NServicebus with settings like this
Relevant log output
Additional Information
Workarounds
Possible solutions
Additional information
The text was updated successfully, but these errors were encountered: