From 4aa25520e126475bc029199c871b8fcabec7311f Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Thu, 6 Jul 2017 18:32:35 +0800 Subject: [PATCH] modify rabbitmq queue to use no exclusive. --- src/DotNetCore.CAP.Kafka/IProcessor.KafkaJobProcessor.cs | 1 - src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DotNetCore.CAP.Kafka/IProcessor.KafkaJobProcessor.cs b/src/DotNetCore.CAP.Kafka/IProcessor.KafkaJobProcessor.cs index 97f38f8..9e89be1 100644 --- a/src/DotNetCore.CAP.Kafka/IProcessor.KafkaJobProcessor.cs +++ b/src/DotNetCore.CAP.Kafka/IProcessor.KafkaJobProcessor.cs @@ -100,7 +100,6 @@ namespace DotNetCore.CAP.Kafka message.StatusName = StatusName.Succeeded; await messageStore.UpdateSentMessageAsync(message); - _logger.JobExecuted(sp.Elapsed.TotalSeconds); } catch (Exception ex) diff --git a/src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs b/src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs index 75766a5..e21cc69 100644 --- a/src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs +++ b/src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs @@ -45,7 +45,7 @@ namespace DotNetCore.CAP.RabbitMQ _connection = _connectionFactory.CreateConnection(); _channel = _connection.CreateModel(); _channel.ExchangeDeclare(exchange: _exchageName, type: _rabbitMQOptions.EXCHANGE_TYPE); - _channel.QueueDeclare(_queueName); + _channel.QueueDeclare(_queueName, exclusive: false); } public void Listening(TimeSpan timeout)