I am trying to setup an NServiceBus.Router endpoint to faciliate communication between an Azure Service Bus endpoint and an SQS endpoint. When I try to enable message driven pub/sub on the sqs interface router configuration, it wants an ISubscriptionStorage, but I do not see how to get a reference to that in the official NServiceBus MongoDB package.
Here’s a sample snippet:
var routerConfig = new RouterConfiguration(endpointName);
var sqsInterface = routerConfig.AddInterface<SqsTransport>("SQS", t =>
{
t.ClientFactory(() =>
new AmazonSQSClient(
new BasicAWSCredentials(AppConfiguration.Instance.AccessKey, AppConfiguration.Instance.AccessSecret),
RegionEndpoint.GetBySystemName(AppConfiguration.Instance.AwsRegion)));
});
var mongoDatabase = ...;
sqsInterface.EnableMessageDrivenPublishSubscribe(new SubscriptionPersister(mongoDatabase));