Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
     }
 }