Add filtered and source fields to typed EventEnvelope#2807
Merged
He-Pin merged 1 commit intoapache:mainfrom Mar 28, 2026
Merged
Add filtered and source fields to typed EventEnvelope#2807He-Pin merged 1 commit intoapache:mainfrom
He-Pin merged 1 commit intoapache:mainfrom
Conversation
Add 'filtered' (Boolean) and 'source' (String) fields to the typed EventEnvelope class for supporting filtered event delivery and tracking event sources (e.g. backtracking queries). These fields are needed by Projections to handle filtered events and event source attribution. Changes: - EventEnvelope: Add filtered/source constructor params with backward- compatible auxiliary constructor defaulting to (false, "") - EventEnvelope companion: Add new apply/create factory methods with filtered and source parameters - EventEnvelope.equals: Include filtered field in equality check - EventEnvelope.toString: Include filtered and source in output - QueryMessages.proto: Add optional bool filtered = 10 and optional string source = 11 fields - QuerySerializer: Serialize/deserialize the new fields - QuerySerializerSpec: Add test for filtered and source round-trip - Regenerate QueryMessages.java from updated proto definition Upstream: akka/akka-core@c9e4fa6f9f Cherry-picked from akka/akka-core v2.8.0, which is now Apache licensed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
70aaec8 to
2fa22d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Typed EventEnvelope lacked metadata fields needed for advanced event processing -- specifically whether an event was filtered and what source produced it.
Modification
Added filtered (Boolean) and source (String) fields to typed EventEnvelope with backward-compatible defaults. Updated protobuf schema, serializer, and factory methods.
Result
Enables downstream processors to distinguish filtered events and trace event sources for debugging and routing.
References