I’ve been tasked with getting SS to work with AWS/SQS replacing our existing RabbitMq implementation that was not using SS at all. Our existing model with Rabbit is a fire and forget style system and several different microsystems subscribe to similar types for which MassTransit creates exchanges in Rabbit.
I’ve been able to get the basics running in SS using the examples online but I have a few questions/challenges.
-
All of the queues and messages posted from SS are invisible to me in the console. I know they exist because I can query the list of queues and see them in the debugger but from the console nothing. I’m logged into the console as myself and in code I’m using my own AWS keys so I don’t know whats up with that.
-
How would I duplicate the idea of several micro services (each running SS for example) all having a queue of their own for the application and then subscriptions to each type. When one microsystem (MS) broadcasts a general message of type X I want all of the other microservices to pick it up and call its own endpoint (if they’ve registered that type of course). I think we’ll need to use SNS topics which brings me to the next question:
-
How can we publish a message to a topic?
I’m having trouble figuring out how all of the classes fit together for Sqs. For example:
var mqServer = new SqsMqServer(accessKey, secretKey, RegionEndpoint.USWest1);
var mqClient = _mqService.CreateMessageQueueClient();
var message = new Message<CustomerDemographics>(new CustomerDemographics { SomeValue = "created in HelloWorld endpoint"});
var tempQueueName = mqClient.GetTempQueueName();
var msgFactory = _mqService.MessageFactory as SqsMqMessageFactory;
var msgProducer = msgFactory.CreateMessageProducer() as SqsMqMessageProducer;
var queueManager = msgFactory.QueueManager;
var sqsClient = queueManager.SqsClient;
var queues = sqsClient.ListQueues(new ListQueuesRequest());
var sqsDemoQueue = queueManager.GetQueueDefinition("SOME-QUEUE-I-CREATED-IN-AWS-CONSOLE");
var sqsCustomerDemographicInq = queueManager.GetQueueDefinition(qCustDemoAllQueueNames[0]);
-
How does the temporary queue name fit into all of this?
-
It seems SS creates four queues for each type like this:
[0] = {string} “mq:CustomerDemographics.inq”
[1] = {string} “mq:CustomerDemographics.priorityq”
[2] = {string} “mq:CustomerDemographics.outq”
[3] = {string} “mq:CustomerDemographics.dlq”
How do these queues operate together?
Any thoughts, ideas or general guidance is welcome.
Thank you,
-Matthew Mackay