0
爲了說明起見,我有3個Web服務主機正在運行,並且只有其中一個註冊了任何處理程序(我認爲它等同於訂閱頻道/話題)例如ServiceStack獲取Redis Pub/Sub在多個Web站點/服務之間工作的最低配置
var mqService = new RedisMqServer(container.Resolve<IRedisClientsManager>())
{
DisablePriorityQueues = true
};
container.Register<IMessageService>(mqService);
container.Register(mqService.MessageFactory);
mqService.RegisterHandler<OutboundInitiateCallInfo>(ServiceController.ExecuteMessage);
mqService.RegisterHandler<DirectMailAssignmentInfo>(ServiceController.ExecuteMessage);
mqService.Start();
現在我的問題是,「我是否需要以同樣的方式構建其他應用程序主機,如果他們只發布??」例如
var mqService = new RedisMqServer(container.Resolve<IRedisClientsManager>())
{
DisablePriorityQueues = true
};
container.Register<IMessageService>(mqService);
container.Register(mqService.MessageFactory);
mqService.Start(); <=== Do I need to start the service, or is the MessageFactory registration enough?
謝謝 斯蒂芬