Skip to content

Is it mandatory to provide full sqs url? #214

Answered by viniciuschiele
SBIgnas asked this question in Q&A
Discussion options

You must be logged in to vote

It doesn’t appear to be directly supported, but you could add an extension method to IMessageBusBuilder, such as builder.AddSqsQueue("test-message-queue"). This method would construct the QueueUrl by retrieving the AccountId and Region from the current AWS credentials.

I haven’t tested it, but this code might work if your service is running within AWS.

var credentials = FallbackCredentialsFactory.GetCredentials().GetCredentials();
var regionEndpoint = FallbackRegionFactory.GetRegionEndpoint();

var accountId = credentials.AccountId;
var region = regionEndpoint.SystemName;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SBIgnas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants