Skip to content

feat(projection): pilot checkpointing behavior inside Projection.Apply#54

Merged
ar3s3ru merged 3 commits intomainfrom
pilot-checkpoint-in-projection
Aug 31, 2021
Merged

feat(projection): pilot checkpointing behavior inside Projection.Apply#54
ar3s3ru merged 3 commits intomainfrom
pilot-checkpoint-in-projection

Conversation

@ar3s3ru
Copy link
Copy Markdown
Collaborator

@ar3s3ru ar3s3ru commented Aug 31, 2021

Sometimes it's desirable to specify inside a Projection whether the message being consumed should be checkpointed or not.

Example: projecting messages to a Kafka topic using batching -- if a whole batch fails, but we already committed the batch events processed in the Projection, then we need manual intervention.

This PR adds the following modifications:

  1. projection.Runner creates some checkpointing information (*bool) and post it in the context for Projection.Apply to use it,
  2. projection.Checkpoint(ctx), where the context set by projection.Runner specifies to checkpoint the current message if successful,
  3. projection.DoNotCheckpoint(ctx), as above but without checkpointing.

@ar3s3ru ar3s3ru added the enhancement New feature or request label Aug 31, 2021
@ar3s3ru ar3s3ru enabled auto-merge (squash) August 31, 2021 10:20
@ar3s3ru ar3s3ru force-pushed the pilot-checkpoint-in-projection branch from 464aa65 to e4ece4b Compare August 31, 2021 10:50
@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

68.0% 68.0% Coverage
0.0% 0.0% Duplication

@ar3s3ru ar3s3ru merged commit 47f3be0 into main Aug 31, 2021
@ar3s3ru ar3s3ru deleted the pilot-checkpoint-in-projection branch August 31, 2021 10:53
@github-actions github-actions Bot mentioned this pull request Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant