Open Closed

AzureDistributedEventBus with inbox pattern not auditing in AbpEntityPropertyChanges #7928


User avatar
0
mariovh created
  • ABP Framework version: v8.1.3
  • UI Type: Blazor WASM
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, I'm using AzureDistributedEventBus with inbox patter, for incoming Azure Service Bus Messages. While creating or updating an aggregate in a handler/synchronizer there's no entries created in audit tables AbpEntityChanges and AbpEntityPropertyChanges. How can I leave a trace in those tables when I insert or update the aggregate with a repository, taking into account that the change does not come from a request to the API but from a message received through Azure Service Bus?

Thank you


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Your event handler can implement theIAuditingEnabled interface to enable the audit logging for that class by default.

    public class MyHandler : IDistributedEventHandler, IAuditingEnabled
    {
        
        // add virtual keyword
        public virtual async ..... HandleEventAsync(xxx)
        {
        
        }
    }
    
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13