From c3d88a83baa588e892b62fb451292dc3a913548a Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 29 Nov 2021 10:13:18 +0800 Subject: [PATCH 1/2] Fix PublishToEventBusAsync problem. --- .../Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs index a719e0a8d5..f809159346 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs @@ -180,7 +180,7 @@ namespace Volo.Abp.EventBus.Azure protected override async Task PublishToEventBusAsync(Type eventType, object eventData) { - await PublishAsync(eventType, eventData); + await PublishAsync(EventNameAttribute.GetNameOrDefault(eventType), eventData); } protected override void AddToUnitOfWork(IUnitOfWork unitOfWork, UnitOfWorkEventRecord eventRecord) From dbe689323ae23c280fea5a5618a8eb1fea2d7eca Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 29 Nov 2021 10:38:44 +0800 Subject: [PATCH 2/2] Update AzureDistributedEventBus.cs --- .../Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs index d0ba31eb67..49add5df84 100644 --- a/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs +++ b/framework/src/Volo.Abp.EventBus.Azure/Volo/Abp/EventBus/Azure/AzureDistributedEventBus.cs @@ -172,21 +172,15 @@ public class AzureDistributedEventBus : DistributedEventBusBase, ISingletonDepen .Locking(factories => factories.Remove(factory)); } - protected override async Task PublishToEventBusAsync(Type eventType, object eventData) - { - await PublishAsync(EventNameAttribute.GetNameOrDefault(eventType), eventData); - } - public override void UnsubscribeAll(Type eventType) { GetOrCreateHandlerFactories(eventType) .Locking(factories => factories.Clear()); } - protected override async Task PublishToEventBusAsync(Type eventType, object eventData) { - await PublishAsync(eventType, eventData); + await PublishAsync(EventNameAttribute.GetNameOrDefault(eventType), eventData); } protected override void AddToUnitOfWork(IUnitOfWork unitOfWork, UnitOfWorkEventRecord eventRecord)