# Azure Storage Queues Transport Upgrade Version 10 to 11 ## Configuring the transport To use the Azure Storage Queues transport for NServiceBus, create a new instance of `AzureStorageQueueTransport` and pass it to `EndpointConfiguration.UseTransport`. Instead of: ```csharp var transport = endpointConfiguration.UseTransport(); transport.Transactions(TransportTransactionMode.ReceiveOnly); var routing = t.Routing(); routing.RouteToEndpoint(typeof(MyMessage), "DestinationEndpoint"); ``` Use: ```csharp var transport = new AzureStorageQueueTransport("azure-storage-connection-string") { TransportTransactionMode = TransportTransactionMode.ReceiveOnly }; var routing = endpointConfiguration.UseTransport(transport); routing.RouteToEndpoint(typeof(MyMessage), "DestinationEndpoint"); ``` > [!NOTE] > The existing API surface with `UseTransport()` is supported via a [shim API](https://en.wikipedia.org/wiki/Shim_(computing)) to ease migration. However, it is recommended to switch to the new transport configuration API to prepare for future upgrades of NServiceBus. ## Configure clients Configuring clients for queue, blob or table is done via the constructor overload. Setting those via properties is no longer possible. ## Configuration options The Azure Storage Queues transport configuration options have been moved to the `AzureStorageQueueTransport` class properties and constructors. See the following table for further information: | Version 9 configuration option | Version 10 configuration option | | ----------------------------------------------------- | -----------------------------------------| | MessageInvisibleTime | MessageInvisibleTime | | PeekInterval | PeekInterval | | MaximumWaitTimeWhenIdle | MaximumWaitTimeWhenIdle | | SanitizeQueueNamesWith | QueueNameSanitizer | | BatchSize | ReceiverBatchSize | | DegreeOfReceiveParallelism | DegreeOfReceiveParallelism | | SerializeMessageWrapperWith | MessageWrapperSerializationDefinition | | UnwrapMessagesWith | MessageUnwrapper | | AccountRouting | AccountRouting | | DefaultAccountAlias | AccountRouting.DefaultAccountAlias | | DelayedDelivery | DelayedDelivery | | DelayedDelivery.UseTableName | DelayedDelivery.DelayedDeliveryTableName | | DisableDelayedDelivery | use the transport constructor overload | | UseQueueServiceClient | use the transport constructor overload | | UseBlobServiceClient | use the transport constructor overload | | UseCloudTableClient | use the transport constructor overload | ## Account routing changes When setting up aliases for account routing, use the overload that accepts `QueueServiceClient` and `CloudTableClient` instances instead of the deprecated overload that accepts a connection string (which will be removed in a future version). Instead of: ```csharp var accountRouting = transport.AccountRouting(); accountRouting.AddAccount("accountAlias", "account_connection_string"); ``` Use: ```csharp var accountRouting = transport.AccountRouting(); accountRouting.AddAccount( "accountAlias", new QueueServiceClient("account_connection_string"), CloudStorageAccount.Parse("account_connection_string").CreateCloudTableClient()); ```