Attività di "tushar_ww"

The approach in the link seems promising, we will get it a try.

So switching from ID to GUID is out of question at this point in our application development process.

InsertAsync() is returning me the ID. So I do not think I need to handle HandleEventAsync() to get the ID.

If the above statements are correct. then PublishAsync() seems to be the only option for me. And if that is the way to go, then is it enough to remove just this code to stop any default Kafka Publish or do you suggest a different method?

Configure<AbpDistributedEntityEventOptions>(options => { //Enable for Location entity options.AutoEventSelectors.Add<X>(); options.EtoMappings.Add<X, Y>(); });

Hi,

So are you manually using the Kafka API to post messages instead of EventBus?

Sorry, I was too short in my context. We have enabled Kafka using AbpEventBusKafkaModule and *Etos and use the SaveChanges() to trigger the messages. We do not (want to) use _distributedEventBus.PublishAsync(...) to explicitly fire the message.

I may want to publish the message only if say the status = "ACTIVE" or IsExpired = false

Can you explain in detail? thanks.

So, in the implementation so far, when a new entity is created a message is published immediately. But maybe I do not want the message published because an entity property IsActive = false. Later sometime, IsActive = true will happen. That time the message should be published. It doesn't matter to me if the publish of the entity happens using UpdatedEvent or CreatedEvent.

Basically, I am looking for a mechanism to filter which messages should be posted.

Well, I cannot assign the ID manually in the EF (SQL Server) world, because it is being generated in the database by the identity column during insert. You may notice in the message "Id"=0.

Doesn't ABP framework have any mechanism for database generated int identity-column entities?

1 - 4 di 4
Made with ❤️ on ABP v8.2.0-preview Updated on marzo 25, 2024, 15:11