Browse Source

Update usage of default value

pull/12023/head
Necati Meral 5 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 string ExchangeType { get; set; }
public AbpRabbitMqEventBusOptions()
{
ExchangeType = "direct";
}
public string GetExchangeTypeOrDefault() public string GetExchangeTypeOrDefault()
{ {
return string.IsNullOrEmpty(ExchangeType) 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( Consumer = MessageConsumerFactory.Create(
new ExchangeDeclareConfiguration( new ExchangeDeclareConfiguration(
AbpRabbitMqEventBusOptions.ExchangeName, AbpRabbitMqEventBusOptions.ExchangeName,
type: AbpRabbitMqEventBusOptions.ExchangeType, type: AbpRabbitMqEventBusOptions.GetExchangeTypeOrDefault(),
durable: true durable: true
), ),
new QueueDeclareConfiguration( new QueueDeclareConfiguration(
@ -244,7 +244,7 @@ public class RabbitMqDistributedEventBus : DistributedEventBusBase, ISingletonDe
{ {
channel.ExchangeDeclare( channel.ExchangeDeclare(
AbpRabbitMqEventBusOptions.ExchangeName, AbpRabbitMqEventBusOptions.ExchangeName,
AbpRabbitMqEventBusOptions.ExchangeType, AbpRabbitMqEventBusOptions.GetExchangeTypeOrDefault(),
durable: true durable: true
); );

Loading…
Cancel
Save