channel.foreach{c=>c.close();loggerF.logInfo(_=>StructuredLog(s"completed writing segment at version ${checkpointTime}",EventTypes.DataUpdate,"",LogCategories.Synchronous))}
loggerF.logInfo(_=>StructuredLog(s"No More messages to process in pubsub at this moment. Will move to next step pullStartTime:$pullStartTime :currentTime:${System.currentTimeMillis()}",EventTypes.DataAccess,"",LogCategories.CronJobLogs))
currentBatch.clear()
}
}
valackDeadlineNearExpiry=pullStartTime>=(checkpointTime+240000L)//240 seconds, for schedule duration of 5 mins
loggerF.logInfo(_=>StructuredLog(s"Total messages processed in this run ${counter.get()}, Table Write count ${fullContent.length}, checkPointTime $checkpointTime",EventTypes.DataAccess,"",LogCategories.CronJobLogs))