Reputation: 4138
I have 3 servers, each hosting single servicestack REST service. They are connected in a chain. I would like to make some data replication via message passing. Is there any message passing mechanism in servicestack ? Or maybe I should use some third party tool ?
Upvotes: 1
Views: 99
Reputation: 143379
The easiest way is to use any of the .NET ServiceClients and call it remote service directly, e.g:
var remoteService = new JsonServiceClient(remoteBaseUrl);
var response = remoteService.Post(new Request { ... })
You can also use a Redis MQ or RabbitMQ host and register handlers in the Remote Service host.
Depending on your use-case you may also be able to take advantage of the ServerEvents .NET Client support to listen for events on a persistent connection with the remote instance.
Also the built-in Pub/Sub support in Redis makes a good remote IPC solution between servers.
Upvotes: 4