예제 #1
0
        public void Send(IEnvelope envelope)
        {
            if (envelope.Message == null)
            {
                envelope.Acknowledge();
                return;
            }

            var id = string.IsNullOrEmpty(
                envelope.CorrelationId)
                         ? (envelope.MessageId.GetHashCode() % 100).ToString()
                         : envelope.CorrelationId;

            Loop.Enqueue(() =>
            {
                SendToHandler(id, envelope);
            });
        }