Exemple #1
0
        internal virtual void OnMessageReceived(Stream messageBody)
        {
            ClusterMessage message = m_formatter.Deserialize(messageBody);

            lock (_messageListSwitchSync)
            {
                _incomingMessages.Add(message);
                CounterManager.SetRawValue("IncomingMessages", Convert.ToInt64(_incomingMessages.Count));
                var totalMessages = _incomingMessages.Count + _messagesCount;
                CounterManager.SetRawValue("TotalMessagesToProcess", Convert.ToInt64(totalMessages));
                //_incomingMessageSignal.Set();
            }
        }
Exemple #2
0
        protected internal virtual void OnMessageReceived(Stream messageBody)
        {
            ClusterMessage message = m_formatter.Deserialize(messageBody);

            SnTrace.Messaging.Write("Received a '{0}' message.", message.GetType().FullName);

            lock (MessageListSwitchSync)
            {
                _incomingMessages.Add(message);

                //TODO: trace incoming and total message count
                // var totalMessages = _incomingMessages.Count + _messagesCount;
            }
        }