-
Notifications
You must be signed in to change notification settings - Fork 12
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: implement batch map #132
Conversation
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
pkg/mapper/examples/batchmap/main.go
Outdated
msg := d.Value() | ||
_ = d.EventTime() // Event time is available | ||
_ = d.Watermark() // Watermark is available | ||
results := mapper.NewBatchResponse(d.Id()) |
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.
Is an empty response valid to ensure prop ACK'ing of message without necessarily assigning a response message to it?
Ex. my batch is a list of JSON, but in my handler I take combine them into a list of JSON (psedo-reduce). One of the NewBatchResponse
would align with the new message, but the rest I would want to acknowledge as complete, but they wouldn't have an actual response.
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 would still need to add an empty batch response for those IDs with an empty list. We expect that the number of requests in batch and number of responses to be equal.
But for you use case if you pass on an empty response with the correct ID, those should be acked
results := mapper.NewBatchResponse(d.Id())
batchResponses = batchResponses.Append(results)
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
Signed-off-by: Sidhant Kohli <[email protected]>
merging to a tmp branch |
No description provided.