-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]] { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Draft on restructuring in #16