1234567891011121314151617181920212223 |
- namespace metrics_sender
- {
- using System;
- // TODO: import library
- class MetricsSender
- {
- static void Main(string[] args)
- {
- string url = "amqp://localhost:61616";
- string address = "sampleQueue";
- // TODO: create and initialise messaging objects
- Console.WriteLine("Sending random metrics to " + url + "/" + address);
- var rand = new Random();
- while (true) {
- // TODO: send a new random number to the message queue
- Console.WriteLine("Sent: " + rand.Next(10000).ToString());
- System.Threading.Thread.Sleep(1000);
- }
- }
- }
- }
|