stankiewicz commented on code in PR #37164:
URL: https://github.com/apache/beam/pull/37164#discussion_r2682830599
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/SolaceCheckpointMark.java:
##########
@@ -48,13 +48,14 @@ private SolaceCheckpointMark() {}
*
* @param safeToAck - a queue of {@link BytesXMLMessage} to be acknowledged.
*/
- SolaceCheckpointMark(List<BytesXMLMessage> safeToAck) {
+ SolaceCheckpointMark(Queue<BytesXMLMessage> safeToAck) {
this.safeToAck = safeToAck;
}
@Override
public void finalizeCheckpoint() {
- for (BytesXMLMessage msg : safeToAck) {
+ BytesXMLMessage msg;
+ while ((msg = safeToAck.poll()) != null) {
Review Comment:
it won't be spammy as it may be single message at most per checkpoint mark
as nack thread and finalize checkpoint thread share a queue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]