Beispiel #1
0
        /// <summary>
        /// Requeues the specified message.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="delayMilliseconds">Number of milliseconds to delay delivery of the message.</param>
        public void Requeue(Message message)
        {
            var topic = message.Header.Topic;

            s_logger.LogDebug($"MsSqlMessagingConsumer: re-queuing message with topic {topic} and id {message.Id.ToString()}");

            _sqlQ.Send(message, topic);
        }
Beispiel #2
0
        public void Send(Message message)
        {
            var topic = message.Header.Topic;

            Logger.Value.Debug($"MsSqlMessageProducer: send message with topic {topic} and id {message.Id.ToString()}");

            _sqlQ.Send(message, topic);
        }
Beispiel #3
0
        public void Send(Message message)
        {
            var topic = message.Header.Topic;

            s_logger.LogDebug("MsSqlMessageProducer: send message with topic {Topic} and id {Id}", topic,
                              message.Id.ToString());

            _sqlQ.Send(message, topic);
        }
        /// <summary>
        /// Requeues the specified message.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="delayMilliseconds">Number of milliseconds to delay delivery of the message.</param>
        /// <returns>True when message is requeued</returns>
        public bool Requeue(Message message, int delayMilliseconds)
        {
            Task.Delay(delayMilliseconds).Wait();
            var topic = message.Header.Topic;

            s_logger.LogDebug("MsSqlMessagingConsumer: re-queuing message with topic {Topic} and id {Id}", topic,
                              message.Id.ToString());

            _sqlQ.Send(message, topic);
            return(true);
        }