finalStringerrorMessage="No valid committed offset found for input topic %s (partition %s) and no valid reset policy configured."+
" You need to set configuration parameter \"auto.offset.reset\" or specify a topic specific reset "+
"policy via StreamsBuilder#stream(..., Consumed.with(Topology.AutoOffsetReset)) or StreamsBuilder#table(..., Consumed.with(Topology.AutoOffsetReset))";
addToResetList(partition,seekToBeginning,"No custom setting defined for topic '{}' using original config '{}' for offset reset","earliest",loggedTopics);
}else{// can only be "latest"
}elseif("latest".equals(originalReset)){
addToResetList(partition,seekToEnd,"No custom setting defined for topic '{}' using original config '{}' for offset reset","latest",loggedTopics);
}else{
notReset.add(partition);
}
}
}
if(!seekToBeginning.isEmpty()){
mainConsumer.seekToBeginning(seekToBeginning);
}
if(!seekToEnd.isEmpty()){
mainConsumer.seekToEnd(seekToEnd);
if(notReset.isEmpty()){
if(!seekToBeginning.isEmpty()){
mainConsumer.seekToBeginning(seekToBeginning);
}
if(!seekToEnd.isEmpty()){
mainConsumer.seekToEnd(seekToEnd);
}
}else{
finalStringnotResetString=
notReset.stream()
.map(TopicPartition::topic)
.distinct()
.collect(Collectors.joining(","));
finalStringformat=String.format(
"No valid committed offset found for input [%s] and no valid reset policy configured."+
" You need to set configuration parameter \"auto.offset.reset\" or specify a topic specific reset "+
"policy via StreamsBuilder#stream(..., Consumed.with(Topology.AutoOffsetReset)) or "+