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: test DynamoDB projections #17

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

feat: test DynamoDB projections #17

wants to merge 3 commits into from

Conversation

pvlugter
Copy link
Contributor

Draft on restructuring in #16

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

looking good, but probably an issue with the batch writes


client
.batchWriteItem(
BatchWriteItemRequest.builder
Copy link
Member

Choose a reason for hiding this comment

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

This is not checking the unprocessedItems so it's suffering from the same problem as akka/akka-projection#1260

I also created issue akka/akka-projection#1286

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Using a provided retry utility sounds good. Will add this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

import software.amazon.awssdk.services.dynamodb.model.WriteRequest

class DynamoDBProjectionHandler(projectionId: ProjectionId, projectionIndex: Int, readOnly: Boolean, failEvery: Int)
extends DynamoDBTransactHandler[EventEnvelope[ConfigurablePersistentActor.Event]] {
Copy link
Member

Choose a reason for hiding this comment

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

We should also have a variant that is not using exactly-once, but still one-by-one handler

Copy link
Contributor Author

@pvlugter pvlugter Jan 6, 2025

Choose a reason for hiding this comment

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

Yes. Just adding the equivalent of what's there already in this PR. Will follow up after by extending to a singular at-least-once, and make it more configurable between them — just commented out in each implementation currently.

Base automatically changed from restructure to main January 6, 2025 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants