Browse Source

Update usage of default value

pull/12023/head
Necati Meral 4 years ago
parent
commit
ff9ebdbcab
  1. 5
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/AbpRabbitMqEventBusOptions.cs
  2. 4
      framework/src/Volo.Abp.EventBus.RabbitMQ/Volo/Abp/EventBus/RabbitMq/RabbitMqDistributedEventBus.cs

5
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)

4
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
);

Loading…
Cancel
Save