You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (null != snapshotMessageKey && !snapshotProcessed) {
260
+
if (null != snapshotId && !snapshotProcessed) {
261
261
//If there is a snapshot key present, we process (and discard) all the messages until we find the snapshot marker that corresponds to the snapshot key.
262
262
Iterator<ConsumerRecord<KafkaSqlMessageKey, KafkaSqlMessage>> it = records.iterator();
263
263
while (it.hasNext() && !snapshotProcessed) {
264
264
ConsumerRecord<KafkaSqlMessageKey, KafkaSqlMessage> record = it.next();
265
-
if (processSnapshot(snapshotMessageKey, record)) {
265
+
if (processSnapshot(snapshotId, record)) {
266
266
snapshotProcessed = true;
267
267
break;
268
268
} else {
269
-
log.info("Discarding message with key {} as it was sent before a snapshot was created", record.key());
269
+
log.debug("Discarding message with key {} as it was sent before a newer snapshot was created", record.key());
270
270
}
271
271
}
272
272
273
-
//Once the snapshot marker message has been found, we can process the rest of the messages as usual, applying the new changes on top of the existing ones in the snapshot.
274
-
while (it.hasNext()) {
275
-
ConsumerRecord<KafkaSqlMessageKey, KafkaSqlMessage> record = it.next();
//If the snapshot marker has not been found, continue with message skipping until we find it.
274
+
if (snapshotProcessed) {
275
+
//Once the snapshot marker message has been found, we can process the rest of the messages as usual, applying the new changes on top of the existing ones in the snapshot.
276
+
while (it.hasNext()) {
277
+
ConsumerRecord<KafkaSqlMessageKey, KafkaSqlMessage> record = it.next();
0 commit comments