Bladeren bron

reorganize error message prompts.

master
Savorboard 7 jaren geleden
bovenliggende
commit
141ece8231
2 gewijzigde bestanden met toevoegingen van 8 en 7 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

@@ -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);
}


Laden…
Annuleren
Opslaan