Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IgnoreEventSelectors to AbpDistributedEntityEventOptions for event filtering. #22471

Open
wants to merge 3 commits into
base: rel-9.2
Choose a base branch
from

Conversation

maliming
Copy link
Member

@maliming maliming commented Mar 27, 2025

Resolves #22469

Ignore OutgoingEventRecord and IncomingEventRecord from DistributedEntityEvent

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances distributed event filtering by introducing an IgnoreEventSelectors property to exclude specific entity events (e.g. for OutgoingEventRecord and IncomingEventRecord) from being published, thereby resolving an infinite event loop issue.

  • Adds IgnoreEventSelectors configuration in both MongoDB and EntityFrameworkCore modules
  • Integrates IgnoreEventSelectors into the event publishing logic in EntityChangeEventHelper
  • Introduces the IgnoreEventSelectors property in AbpDistributedEntityEventOptions

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
framework/src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs Configures IgnoreEventSelectors to skip events from OutgoingEventRecord and IncomingEventRecord
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs Mirrors the MongoDB module configuration for IgnoreEventSelectors
framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs Incorporates new IgnoreEventSelectors in decision logic for event publication
framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs Adds the IgnoreEventSelectors property and initializes it in the constructor

@maliming maliming marked this pull request as draft March 27, 2025 05:42
@maliming maliming marked this pull request as ready for review March 27, 2025 05:52
@maliming maliming requested a review from hikalkan March 27, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant