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

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

Merged
merged 3 commits into from Aug 31, 2021

Conversation

ar3s3ru
Copy link
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
@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2021

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
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.

None yet

1 participant