コード例 #1
0
 static void Main(string[] args)
 {
     Console.WriteLine("(WebClient) Listening...");
     while (true)
     {
         BusFactory.Listen <AlertMessage>((payload, response) => {
             Console.WriteLine($"RECEIVED@{response.routing_key}: {payload}");
         });
     }
 }
コード例 #2
0
        static void Main(string[] args)
        {
            var channel = BusFactory.SetupChannel();

            //Configure TOPIC!
            BusFactory.SetupTopic(channel);
            Console.WriteLine("Server Up and running...");
            BusFactory.Listen <AlertMessage>((data, ea) =>
            {
                Console.WriteLine($"RECEIVED@{ea.RoutingKey}: {data}");
            });
        }