Example #1
0
        private MessageQueue CreateSampleMessageQueue( MessagePriority priority )
        {
            MessageQueue queue = new MessageQueue();
            for (int i = 0; i < 10; i++)
            {
                queue.Add(new Message(priority,"message."+i));
            }

            return queue;
        }
Example #2
0
 /// <summary>
 /// Dispatches a queue to particular consumer.
 /// </summary>
 /// <param name="messages"></param>
 /// <param name="consumer"></param>
 public void Dispatch(MessageQueue messages, Consumer consumer)
 {
     consumer.Queue = messages;
     consumer.MessageSource = this;
 }