Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASQ v7: API for secure connection string with default connection string only is broken #308

Closed
SeanFeldman opened this issue Jan 12, 2018 · 2 comments
Assignees

Comments

@SeanFeldman
Copy link
Contributor

SeanFeldman commented Jan 12, 2018

Who's affected

  • Anyone using NServiceBus version 7 and above

Symptoms

When using ASQ with secured connection string (alias instead of connection string) with a default storage account, dispatches are failing with NullReferenceException.

Details

Default storage account connection string is not associated with the default alias. Instead, the alias is mapped to an empty string, which causes CreateQueueClients to build a null CloudQueueClient that is used during dispatching, causing an exception.

According to documentation, API should be used in the following manner:

var transport = endpointConfiguration.UseTransport<AzureStorageQueueTransport>();
transport.ConnectionString("account_A_connection_string");
transport.UseAccountAliasesInsteadOfConnectionStrings();
transport.DefaultAccountAlias("account_A");

In reality this is failing when an attempt is made to dispatch a message to account_A.

Workaround

Workaround is to register default connection string and its alias via AccountRouting() API.

var transport = endpointConfiguration.UseTransport<AzureStorageQueueTransport>();
transport.ConnectionString("account_A_connection_string");
transport.UseAccountAliasesInsteadOfConnectionStrings();
transport.DefaultAccountAlias("account_A");
//workaround - force alias registration
transport.AccountRouting().AddAccount("account_A", "account_A_connection_string"); 

Affected versions

  • 7.4.x
  • 7.5.x
  • 8.0
@SeanFeldman
Copy link
Contributor Author

Documentation update is needed and then this issue could be closed.

@SeanFeldman SeanFeldman self-assigned this Jan 22, 2018
@SeanFeldman SeanFeldman removed the Bug label Jan 23, 2018
@SeanFeldman
Copy link
Contributor Author

Closing in favour of documentation PR Particular/docs.particular.net#3595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant