-
-
Save ethrbunny/9ebb4e3e2b9babdea124fe8a6a7cf5cf to your computer and use it in GitHub Desktop.
Batch Processor Supplier (Kafka KStreams sample)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.kafka.streams.processor.Processor; | |
import org.apache.kafka.streams.processor.ProcessorSupplier; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
public class BPS2 implements ProcessorSupplier<String, String> { | |
private static final Logger LOGGER = LoggerFactory.getLogger(BPS2.class); | |
@Override | |
public Processor<String, String> get() { | |
try { | |
return new BP2(30000); | |
} catch(Exception exception) { | |
LOGGER.error("Unable to instantiate BatchProcessor()", exception); | |
throw new RuntimeException(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment