Exemple #1
0
 /// <summary>
 /// Sends the envelope.
 /// </summary>
 /// <param name="envelope">The envelope.</param>
 protected void SendEnvelope(IMessageEnvelope envelope)
 {
     try
     {
         envelope.User          = this.UserName;
         envelope.Originator    = this.Originator;
         envelope.ReplyTo       = this.ReplyTo;
         envelope.ExpiresOn     = this.ExpiresOn;
         envelope.MessageUID    = Guid.NewGuid();
         envelope.MessageSentOn = DateTime.UtcNow;
         _queueManager.SendMessage(envelope);
         logger.LogPublish(envelope, string.Empty, envelope.Message.GetType());
     }
     catch (System.Exception exception)
     {
         logger.LogPublishFailure(envelope, string.Empty, exception, envelope.Message.GetType());
         throw;
     }
 }