feat: open-source global ProjectionV2 with sync/async event-driven execution#656
Open
feat: open-source global ProjectionV2 with sync/async event-driven execution#656
Conversation
…ecution Make globally-tracked (non-partitioned) projections available without enterprise licence while keeping advanced features enterprise-only.
Do not pass ProjectingHeaders::PROJECTION_NAME to projection handler methods without enterprise licence. This header enables blue-green deployment scenarios and should remain enterprise-only.
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.
Why is this change proposed?
ProjectionV2 is currently entirely gated behind an enterprise licence. Users who want globally-tracked projection that follows event store position cannot use it without purchasing a licence. This change makes the core projection capability available in open-source — giving users production-ready globally-tracked projections — while keeping scaling, operational, and deployment features as enterprise value-adds.
This will allow current Ecotone users to migrates from
Projection(v1)toProjectionV2- which will allow in Ecotone 2.0 for complete removal of old projecting system.Description of Changes
Open-source features (no licence required)
Also supported without licence:
#[Asynchronous('channel')]#[FromStream]/#[FromAggregateStream]on same projection#[ProjectionExecution(eventLoadingBatchSize: 500)]#[ProjectionBackfill](sync only, noasyncChannelName)#[ProjectionState]for stateful handlersEventStreamEmitterEnterprise-only features (require licence)
Custom implementations of
#[StreamSource],#[StateStorage],#[PartitionProvider]also require enterprise licence.Use case scenarios
Read model projection — A team building a CQRS app needs a projection that maintains a denormalized read model from event-sourced aggregates. With this change, they can use
#[ProjectionV2]+#[FromStream]out of the box.Multi-stream aggregation — A dashboard projection consuming events from multiple aggregate streams (e.g., Orders + Payments) works without licence using multiple
#[FromStream]attributes.Scaling to production — When the team needs partition-based parallel processing, async rebuild, or blue-green deployment, they upgrade to enterprise.
Feature split diagram
flowchart TD PV2["#[ProjectionV2]"] --> OSCheck{Open-source eligible?} OSCheck -->|Global + sync/async event-driven| OS["Open Source ✓"] OSCheck -->|Partitioned / Streaming / Polling| ENT["Enterprise Required"] OSCheck -->|ProjectionRebuild / Deployment| ENT OSCheck -->|Async backfill| ENT OSCheck -->|Custom StreamSource / StateStorage| ENT OS --> Features["Lifecycle • Multi-stream • Backfill (sync)\nGap detection • Locking • Batch loading\nEvent emission • ProjectionState"]Pull Request Contribution Terms