예제 #1
0
        public static void Run()
        {
            IPublish <ExampleMessage> queue = Configuration.GetQueue <ExampleMessage>();

            int i = 0;

            while (true)
            {
                Reset.WaitOne();
                i++;

                var message = new ExampleMessage(i, "I am number " + i);
                queue.Send(message);
                Interlocked.Increment(ref _writeCount);

                if (i == int.MaxValue)
                {
                    i = 0;
                }
            }
        }