-
Template: microservice
-
Created ABP Studio Version: 0.9.24
-
Current ABP Studio Version: 0.9.25
-
Multi-Tenancy: Yes
-
UI Framework: angular
-
Theme: leptonx
-
Theme Style: system
-
Run Install Libs: Yes
-
Database Provider: ef
-
Database Management System: sqlserver
-
Mobile Framework: none
-
Public Website: No
-
Include Tests: Yes
-
Dynamic Localization: Yes
-
Kubernetes Configuration: Yes
-
Grafana Dashboard: Yes
-
Use Local References: No
-
Optional Modules:
-
GDPR
-
FileManagement
-
TextTemplateManagement
-
AuditLogging
-
Chat
-
OpenIddictAdmin
-
-
Exception message and full stack trace:
-
Steps to reproduce the issue:
Hi,
I am publishing event in one microservice and listen in another. I've noticed that when I create or delete entities in the distributed event handlers the CreatorId or DeletorId record fields not added. Any ideas?
Thanks.
3 Answer(s)
-
0
Hi,
Can you send your entity contents and if you have a configuration for AbpDistributedEntityEventOptions?
-
0
Hi,
I don't have configuration for AbpDistributedEntityEventOptions
-
0
Hi,
CreatorId and DeletorId are auto-filled using ICurrentUser during HTTP requests. However, in distributed event handling, events are processed asynchronously in another microservice without the original HTTP context, so ICurrentUser data isn’t available, leaving these fields null. I suggest adding CreatorId and DeletorId to the ETO object when publishing the event and then setting them in the event handler as follows:
test.CreatorId = eventData.Entity.CreatorId; test.DeleterId = eventData.Entity.DeleterId;