Exemple #1
0
        private static IMessageService CreateHost(PooledRedisClientManager redisFactory, string channel)
        {
            var mqHost = new RedisMqHost(redisFactory);

            mqHost.RegisterHandlerToChannel <MessageContext <Hello> >(channel, m => new HelloService().Execute(m.GetBody()));

            new Thread(mqHost.Start).Start();             //Starts listening for messages
            return(mqHost);
        }