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
The app fails to send or receive messages from servicebus emulator when ServiceBusClient was created using identity-based connection.
Steps to reproduce:
// running service bus emulator using docker compose before executing this codeusingAzure.Identity;usingAzure.Messaging.ServiceBus;varclient=newServiceBusClient("localhost",newDefaultAzureCredential());varsender=client.CreateSender("topic");awaitsender.SendMessageAsync(newServiceBusMessage("Hello, World!"));
Exception:
No connection could be made because the target machine actively refused it. ErrorCode: ConnectionRefused (ServiceCommunicationProblem). For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot.
at Azure.Messaging.ServiceBus.Amqp.AmqpSender.SendBatchInternalAsync(AmqpMessage batchMessage, TimeSpan timeout, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<>c.<<SendAsync>b__32_0>d.MoveNext()
--- End of stack trace from previous location ---
Does emulator support identity-based connections?
If yes, is there any guidance on what would be the value for service bus fully qualified namespace? (localhost, sbemulatorns, something else...)
If no, are there any plans to support this in future?
The text was updated successfully, but these errors were encountered:
Hi @asos-iqan, Service Bus emulator isn't compatible with Azure Identity based connection. So far, we only support connection string usage with Service Bus emulator.
Would you mind elaborating more on the use case- Is the intent here to keep same code for local testing and prod testing? Or do you have a use case of using Azure Identity to do local testing?
Hi @Saglodha - thanks for the response.
Yes, that is correct. We would like to test function as-is and not have specific changes in production code just to make it work with emulator.
Hi,
The app fails to send or receive messages from servicebus emulator when
ServiceBusClient
was created using identity-based connection.Steps to reproduce:
Exception:
Does emulator support identity-based connections?
If yes, is there any guidance on what would be the value for service bus fully qualified namespace? (localhost, sbemulatorns, something else...)
If no, are there any plans to support this in future?
The text was updated successfully, but these errors were encountered: