I am working on a project that uses NServicebus to publish messages to AWS SQS queues.
NServicebus has a feature that builds the queues, topics, and subscriptions for you when you run the application. Most of my queues/topics/subscriptions have been created this way.
There is one queue that isn't created this way so I created it manually before along with a topic and subscription to go with it.
I am expanding this existing setup to accept new message types. So new topics and subscriptions have been added by NServicebus to work with the existing queues.
When I got to adding the manual topic and subscription to work with the manual queue I did it the same way as before. However, now the messages do not make it to the queue.
I started looking to see what I could have done wrong/differently this time. I found only one difference. Now when looking at the details of the subscription I see "Subscription Principal" on the new but not on the old.
New:
Old:
Digging deeper into this I discovered that the Subscription Principal is different between the newly created NServicebus subscriptions and the manually created one. I am guessing this is the cause of the message not getting to the queue.
But why is this happening now when it didn't happen a couple months ago? Did SQS change how subscriptions work? If so is there a way to make then like they used to? Perhaps a setting somewhere?
After getting in touch with AWS support they mentioned:
Regarding "SubscriptionPrincipal", this shows an IAM role that was being used while creating the subscription. This is a new attribute and hence it will only be shown for newly created subscriptions. I don't think this will create any issue.
Then after going through and recreating the SNS topic and subscription manually there was no problem with the message making it to the queue. We agreed it must have been a mistake when creating them the first time that was overlooked. The new Subscription Principal attribute was a red herring.