NServiceBus.Transport.AzureServiceBus enables the use of the Azure Service Bus Brokered Messaging service as the underlying transport used by NServiceBus. This transport uses the Azure.Messaging.ServiceBus NuGet package.
It is part of the Particular Service Platform, which includes NServiceBus and tools to build, monitor, and debug distributed systems.
See the Azure Service Bus Transport documentation for more details on how to use it.
Follow these steps to run the acceptance tests locally:
- Add a new environment variable
AzureServiceBus_ConnectionStringcontaining a connection string to your Azure Service Bus namespace. - Add a new environment variable
AzureServiceBus_ConnectionString_Restrictedcontaining a connection string to the same namespace withSendandListenrights only. - Some tests are using
Azure.Identitywith theDefaultAzureCredentialand require one of the supported credentials to be present locally. For more information see the troubleshooting guideline
The acceptance and transport test assemblies share one namespace and isolate their entities with a per-assembly prefix. The acceptance test assemblies also run their fixtures in parallel (tests within a fixture stay sequential), so every fixture gets its own namespace segment below the assembly prefix. When a test touches an entity by name through the admin client, wrap the name in AcceptanceTestEntityNames.For(...) so it resolves to the running fixture's entity in every assembly the test is linked into.
The NoHierarchy.AcceptanceTests assembly is the exception: it runs a small slice of the shared scenarios sequentially and without a hierarchy namespace, so the default entity paths stay covered. Add scenarios to its project file with a Compile Include.
- Add a new environment variable
AzureServiceBus_ConnectionStringcontaining a connection string to your Azure Service Bus namespace (can be same as for acceptance tests).