Ev.ServiceBus icon indicating copy to clipboard operation
Ev.ServiceBus copied to clipboard

Change the connection string parser inside the ConnectionSettings class to prevent reinventing the wheel

Open DigitalMushrooms opened this issue 3 months ago • 0 comments

This change improves code quality and maintainability by replacing a custom connection string parser with the official Azure SDK implementation ServiceBusConnectionStringProperties.Parse().

Why? The Azure SDK parser is thoroughly tested by Microsoft and handles all edge cases, encoding issues, and future connection string format changes automatically. No need to maintain custom parsing logic. Updates to connection string format will be handled by SDK updates.

Unit test now uses proper fake connection string.

I also moved the class to the Ev.ServiceBus.Abstractions.Configuration namespace.

UPDATE: I don't think we need to use the absolute URI (sb://<URL>/) to connect to Microsoft Entra ID. We only need the fully qualified name (FQN). Source: Authenticate a managed identity with Microsoft Entra ID to access Azure Service Bus resources

DigitalMushrooms avatar Oct 12 '25 13:10 DigitalMushrooms