Example #1
0
 internal void onConnMessageFinished(Conn c, Message msg)
 {
     Interlocked.Increment(ref _messagesFinished);
 }
Example #2
0
 internal void onConnMessageRequeued(Conn c, Message msg)
 {
     Interlocked.Increment(ref _messagesRequeued);
 }
Example #3
0
 internal void onConnMessage(Conn c, Message msg)
 {
     Interlocked.Decrement(ref _totalRdyCount);
     Interlocked.Increment(ref _messagesReceived);
     _incomingMessages.Send(msg);
     maybeUpdateRDY(c);
 }
Example #4
0
 void IConnDelegate.OnMessageRequeued(Conn c, Message m)
 {
     onConnMessageRequeued(c, m);
 }
Example #5
0
 void IConnDelegate.OnMessageFinished(Conn c, Message m)
 {
     onConnMessageFinished(c, m);
 }
Example #6
0
 void IConnDelegate.OnMessage(Conn c, Message m)
 {
     onConnMessage(c, m);
 }
Example #7
0
        private bool shouldFailMessage(Message message, IHandler handler)
        {
            if (_config.MaxAttempts > 0 && message.Attempts > _config.MaxAttempts)
            {
                log(LogLevel.Warning, string.Format("msg {0} attempted {1} times, giving up",
                    message.Id, message.Attempts));

                try
                {
                    handler.LogFailedMessage(message);
                }
                catch (Exception ex)
                {
                    log(LogLevel.Error, string.Format("LogFailedMessage returned error for msg {0} - {1}",
                        message.Id, ex));
                }

                return true;
            }
            return false;
        }