We have a system that will have one ServiceStack BasicAppHost that runs an MQ client / host per state (Louisiana, Texas, Mississippi).
This MQ client will pass messages back and forth between various state systems (NCIC, Criminal History, DMV, etc…) and our main Web API.
The server side is working great - I’m able to deploy and start the host, and based on my settings.json, I can:
var mqConfig = AppSettings.Get(“Mq”);
QueueNames.SetQueuePrefix(mqConfig.StateQueuePrefix); (LA for example)
Now this host only listens for messages for Louisiana.
On the UI + Web API side of things is where I get a little confused. All users (from many states) will utilize a React Dashboard with a standard SS web api. I have the State the user is tied to, but how do I queue a message specifically for LA versus say TX?
EDIT:
I see the helpers QueueNames.cs and QueueNames<T>.cs
.
QueueNames.ResolveQueueName almost gets me there, except it doesn’t let me specify the Queue Prefix that I need for that user.