Kaynağa Gözat

reorganize error message prompts.

master
Savorboard 7 yıl önce
ebeveyn
işleme
141ece8231
2 değiştirilmiş dosya ile 8 ekleme ve 7 silme
  1. +4
    -1
      src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
  2. +4
    -6
      src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs

+ 4
- 1
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs Dosyayı Görüntüle

@@ -78,7 +78,10 @@ namespace DotNetCore.CAP.Kafka

private void ConsumerClient_OnConsumeError(object sender, Message e)
{
OnError?.Invoke(sender, $"Consumer client raised an error. Topic:{e.Topic}, Reason:{e.Error}");
var message = e.Deserialize<Null, string>(null, StringDeserializer);

OnError?.Invoke(sender, $"An error occurred during consume the message; Topic:'{e.Topic}'," +
$"Message:'{message.Value}', Reason:'{e.Error}'.");
}

private void ConsumerClient_OnMessage(object sender, Message<Null, string> e)


+ 4
- 6
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs Dosyayı Görüntüle

@@ -78,12 +78,10 @@ namespace DotNetCore.CAP.RabbitMQ
RabbitMQOptions.ExchangeType,
true);

var arguments = new Dictionary<string, object> { { "x-message-ttl", _rabbitMQOptions.QueueMessageExpires } };
_channel.QueueDeclare(_queueName,
true,
false,
false,
arguments);
var arguments = new Dictionary<string, object> {
{ "x-message-ttl", _rabbitMQOptions.QueueMessageExpires }
};
_channel.QueueDeclare(_queueName, true, false, false, arguments);

_connectionPool.Return(connection);
}


Yükleniyor…
İptal
Kaydet