Пример #1
0
        /// <summary>
        /// Reads decision and applies it
        /// </summary>
        private void DecisionOverNode(HorseMessage message)
        {
            DecisionOverNode model = message.Deserialize <DecisionOverNode>(_server.Server.MessageContentSerializer);

            if (model == null)
            {
                return;
            }

            HorseQueue queue = _server.Server.FindQueue(model.Queue);

            if (queue == null)
            {
                return;
            }

            Decision decision = new Decision(model.Allow, model.SaveMessage, model.PutBack, model.Acknowledge);

            _ = queue.ApplyDecisionOverNode(model.MessageId, decision);
        }