示例#1
0
        private void SendMessageToBalancer(
            MessageQueue reply,
            LoadBalancerMessage msg)
        {
            var messageSerializer = container.Resolve <IMessageSerializer>();
            var message           = new Message
            {
                ResponseQueue = reply,
                AppSpecific   = (int)MessageType.LoadBalancerMessageMarker
            };

            messageSerializer.Serialize(new[] { msg }, message.BodyStream);
            using (var q = new MessageQueue(loadBalancerQueuePath))
            {
                q.Send(message);
            }
        }
示例#2
0
 private void SendMessageToBalancer(
     MessageQueue reply,
     LoadBalancerMessage msg)
 {
     var messageSerializer = container.Resolve<IMessageSerializer>();
     var message = new Message
     {
         ResponseQueue = reply,
         AppSpecific = (int)MessageType.LoadBalancerMessageMarker
     };
     messageSerializer.Serialize(new[] { msg }, message.BodyStream);
     using (var q = new MessageQueue(loadBalancerQueuePath))
     {
         q.Send(message);
     }
 }