scwhittle commented on code in PR #37007:
URL: https://github.com/apache/beam/pull/37007#discussion_r2599476830
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/SolaceCheckpointMark.java:
##########
@@ -48,14 +48,13 @@ private SolaceCheckpointMark() {}
*
* @param safeToAck - a queue of {@link BytesXMLMessage} to be acknowledged.
*/
- SolaceCheckpointMark(Queue<BytesXMLMessage> safeToAck) {
+ SolaceCheckpointMark(List<BytesXMLMessage> safeToAck) {
this.safeToAck = safeToAck;
}
@Override
public void finalizeCheckpoint() {
- BytesXMLMessage msg;
- while ((msg = safeToAck.poll()) != null) {
+ for (BytesXMLMessage msg : safeToAck) {
Review Comment:
as a follow up, I think the error below could be spammy. You could change
it to happen once for the checkpoint, and maybe just a warning.
--
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]