You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working with Wolverine.AzureServiceBus and using DefaultAzureCredential to authenticate with Azure Service Bus, which works great when I configure a single namespace like this:
opts.UseAzureServiceBus(serviceBusHostName, new DefaultAzureCredential())
.AutoProvision();
However, when I try to enable multi-tenant support using .AddTenantByNamespace(...), I run into an issue:
opts.UseAzureServiceBus(serviceBusHostName, new DefaultAzureCredential())
.TenantIdBehavior(TenantedIdBehavior.FallbackToDefault)
.AddTenantByNamespace("random-tenant", "sb.servicebus.windows.net")
.AutoProvision();
This results in a runtime error:
System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString')
at Azure.Core.Argument.AssertNotNullOrEmpty(String value, String name)
at Azure.Messaging.ServiceBus.Administration.ServiceBusAdministrationClient..ctor(String connectionString, ServiceBusAdministrationClientOptions options)
at Azure.Messaging.ServiceBus.Administration.ServiceBusAdministrationClient..ctor(String connectionString)
at Wolverine.AzureServiceBus.AzureServiceBusTransport.createServiceBusAdministrationClient() in /home/runner/work/wolverine/wolverine/src/Transports/Azure/Wolverine.AzureServiceBus/AzureServiceBusTransport.cs:line 264
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at Wolverine.AzureServiceBus.AzureServiceBusTransport.WithManagementClientAsync(Func`2 action) in /home/runner/work/wolverine/wolverine/src/Transports/Azure/Wolverine.AzureServiceBus/AzureServiceBusTransport.cs:line 88
at Wolverine.AzureServiceBus.AzureServiceBusTransport.WithManagementClientAsync(Func`2 action) in /home/runner/work/wolverine/wolverine/src/Transports/Azure/Wolverine.AzureServiceBus/AzureServiceBusTransport.cs:line 92
at Wolverine.AzureServiceBus.Internal.AzureServiceBusQueue.SetupAsync(ILogger logger) in /home/runner/work/wolverine/wolverine/src/Transports/Azure/Wolverine.AzureServiceBus/Internal/AzureServiceBusQueue.cs:line 53
at Wolverine.AzureServiceBus.Internal.AzureServiceBusQueue.InitializeAsync(ILogger logger) in /home/runner/work/wolverine/wolverine/src/Transports/Azure/Wolverine.AzureServiceBus/Internal/AzureServiceBusQueue.cs:line 165
at Wolverine.Transports.BrokerTransport`1.InitializeAsync(IWolverineRuntime runtime) in /home/runner/work/wolverine/wolverine/src/Wolverine/Transports/BrokerTransport.cs:line 99
at Wolverine.Runtime.WolverineRuntime.startMessagingTransportsAsync() in /home/runner/work/wolverine/wolverine/src/Wolverine/Runtime/WolverineRuntime.HostService.cs:line 243
at Wolverine.Runtime.WolverineRuntime.StartAsync(CancellationToken cancellationToken) in /home/runner/work/wolverine/wolverine/src/Wolverine/Runtime/WolverineRuntime.HostService.cs:line 68
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
It seems like Wolverine still expects a connection string when calling .AddTenantByNamespace(...) and attempts to instantiate ServiceBusAdministrationClient with new ServiceBusAdministrationClient(connectionString) — which fails since I'm using DefaultAzureCredential and not providing any connection string.
Right now, it seems like the root-level credential isn't applied to tenant namespaces, which leads to the connectionString null error. Is this a known issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
I've been working with Wolverine.AzureServiceBus and using DefaultAzureCredential to authenticate with Azure Service Bus, which works great when I configure a single namespace like this:
However, when I try to enable multi-tenant support using .AddTenantByNamespace(...), I run into an issue:
This results in a runtime error:
It seems like Wolverine still expects a connection string when calling
.AddTenantByNamespace(...)
and attempts to instantiate ServiceBusAdministrationClient with new ServiceBusAdministrationClient(connectionString) — which fails since I'm using DefaultAzureCredential and not providing any connection string.Right now, it seems like the root-level credential isn't applied to tenant namespaces, which leads to the connectionString null error. Is this a known issue?
Thanks again for the great work on Wolverine.
Beta Was this translation helpful? Give feedback.
All reactions