We’ve recently moved from SQL Transport to SQS. Our existing tests utilize ISubscriptionStorage interface to query subscriptions and invokes GetSubscriberAddressesForMessage method.
We’re unable to access the ISubscriptionStorage interface via reflection anymore since we’ve moved to SQS transport.
Is there an equivalent interface or implementation for sqs/sns to query the subscriptions?
No, subscriptions are managed through SNS. You can use the SNS SDK to list topics and, for each topic, list subscriptions. That’s the same thing publisher endpoints do (when in hybrid message-driven pub/sub mode) to check who is subscribed to what.
Were you using the ISubscriptionStorage to validate in tests that subscribers’ routing was correctly configured?
That will not work anymore. With the transport using SNS for broadcasting events, there are no subscription messages. The publisher creates topics; subscribers create subscriptions to bind topics to their input queues.
A publisher cannot intercept a new subscriber. If you could explain what led you to intercept subscription messages, we could see if there are other options. If you have privacy concerns, email support [at] particular.net; we can handle it from there.
We were attempting to subscribe to some Salesforce events and persist that data (configuration) in our db on the fly. However, we have a scheduled job to query the same. So, this path is not really that vital to our solution.
Thanks for the clarification though. I really appreciate it!