From ff9ebdbcabbf0e3806644378a39d127bbccb882f Mon Sep 17 00:00:00 2001 From: Necati Meral Date: Sat, 19 Mar 2022 20:46:56 +0100 Subject: [PATCH] Update usage of default value --- .../Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs | 5 ----- .../Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs index dd451d2127..addbc49171 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs @@ -14,11 +14,6 @@ public class AbpRabbitMqEventBusOptions public string ExchangeType { get; set; } - public AbpRabbitMqEventBusOptions() - { - ExchangeType = "direct"; - } - public string GetExchangeTypeOrDefault() { return string.IsNullOrEmpty(ExchangeType) diff --git a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs index 33663086c4..a2932de52e 100644 --- a/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs @@ -69,7 +69,7 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, ISingletonDe Consumer = MessageConsumerFactory.Create( new ExchangeDeclareConfiguration( AbpRabbitMqEventBusOptions.ExchangeName, - type: AbpRabbitMqEventBusOptions.ExchangeType, + type: AbpRabbitMqEventBusOptions.GetExchangeTypeOrDefault(), durable: true ), new QueueDeclareConfiguration( @@ -244,7 +244,7 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, ISingletonDe { channel.ExchangeDeclare( AbpRabbitMqEventBusOptions.ExchangeName, - AbpRabbitMqEventBusOptions.ExchangeType, + AbpRabbitMqEventBusOptions.GetExchangeTypeOrDefault(), durable: true );