Сценарий:
We are using kafka processor API ( not DSL ) for reading records from source topic, stream
processor will write records to one or more target topics.
We know exactly once can be implemented for the entire processor level by using :
props.put("isolation.level", "read_committed");
But we want to decide based on the incoming records key if we want exactly once or at-least once semantic .
import org.apache.kafka.streams.processor.Processor;
public class StreamRouterProcessor implements Processor<String,Object>
{
private ProcessorContext context;
@Override
public void init(ProcessorContext context) {
}
@Override
public void process(String eventName, String eventMessage) // this is called for each record
{
}
}
Есть ли способ выбрать ровно один или хотя бы один раз на лету для каждой обрабатываемой записи (возможно, для каждой записи, обработанной указанным выше методом process ())? .