/// <summary>
        /// Called to process message
        /// </summary>
        /// <param name="rawMessage">The message from the queue</param>
        /// <param name="message">The refined message data. All information should now be present</param>
        protected override void NotifyMessageProcessingReady(IMessagingMessage rawMessage, IncomingMessage message)
        {
            var reply = MessagingNotification.NotifySynchronousMessageReceived(message);

            if (reply == null)
            {
                throw new InvalidOperationException($"Message handler for function {message.MessageFunction} returned null");
            }

            var outgoingMessage = new OutgoingMessage()
            {
                ToHerId         = message.FromHerId,
                Payload         = reply,
                MessageFunction = message.MessageFunction,
                MessageId       = Guid.NewGuid().ToString()
            };

            Task.WaitAll(Core.Send(Logger, outgoingMessage, QueueType.SynchronousReply, rawMessage.ReplyTo, rawMessage.CorrelationId));
        }
 /// <summary>
 /// Called to process message
 /// </summary>
 /// <param name="rawMessage">The message from the queue</param>
 /// <param name="message">The refined message data. All information should now be present</param>
 protected override void NotifyMessageProcessingReady(IMessagingMessage rawMessage, IncomingMessage message)
 {
     Logger.LogDebug("NotifyMessageProcessingReady");
     MessagingNotification.NotifySynchronousMessageReceived(message);
 }
Example #3
0
 /// <summary>
 /// Called to process message
 /// </summary>
 /// <param name="rawMessage">The message from the queue</param>
 /// <param name="message">The refined message data. All information should now be present</param>
 protected override void NotifyMessageProcessingReady(IMessagingMessage rawMessage, IncomingMessage message)
 {
     Logger.LogBeforeNotificationHandler(nameof(MessagingNotification.NotifySynchronousMessageReceived), message.MessageFunction, message.FromHerId, message.ToHerId, message.MessageId);
     MessagingNotification.NotifySynchronousMessageReceived(message);
     Logger.LogAfterNotificationHandler(nameof(MessagingNotification.NotifySynchronousMessageReceived), message.MessageFunction, message.FromHerId, message.ToHerId, message.MessageId);
 }