stankiewicz commented on code in PR #38603:
URL: https://github.com/apache/beam/pull/38603#discussion_r3310935383
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/UnboundedSolaceReader.java:
##########
@@ -190,9 +202,13 @@ public Instant getWatermark() {
@Override
public UnboundedSource.CheckpointMark getCheckpointMark() {
- safeToAckMessages.addAll(receivedMessages);
+ long checkpointId = nextCheckpointId++;
+ ImmutableList<BytesXMLMessage> messages =
ImmutableList.copyOf(receivedMessages);
receivedMessages.clear();
- return new SolaceCheckpointMark(safeToAckMessages);
+ synchronized (lock) {
+ pendingCheckpoints.put(checkpointId, messages);
Review Comment:
as this may grow and grow, can we track with Gauge how many messages are
unacked per connection? UnboundedSolaceSource could have ID (integer) passed
which could be part of metric name.
--
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]