ableegoldman commented on code in PR #17892:
URL: https://github.com/apache/kafka/pull/17892#discussion_r1855365564
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java:
##########
@@ -61,16 +66,32 @@
import static org.apache.kafka.clients.consumer.OffsetResetStrategy.EARLIEST;
import static org.apache.kafka.clients.consumer.OffsetResetStrategy.LATEST;
import static org.apache.kafka.clients.consumer.OffsetResetStrategy.NONE;
+import static
org.apache.kafka.streams.StreamsConfig.PROCESSOR_WRAPPER_CLASS_CONFIG;
public class InternalTopologyBuilder {
public InternalTopologyBuilder() {
this.topologyName = null;
+ this.processorWrapper = new NoOpProcessorWrapper();
}
public InternalTopologyBuilder(final TopologyConfig topologyConfigs) {
this.topologyConfigs = topologyConfigs;
this.topologyName = topologyConfigs.topologyName;
+
+ try {
+ processorWrapper = topologyConfigs.getConfiguredInstance(
+ PROCESSOR_WRAPPER_CLASS_CONFIG,
+ ProcessorWrapper.class,
+ topologyConfigs.originals()
+ );
+ } catch (final Exception e) {
+ final String errorMessage = String.format(
+ "Unable to instantiate ProcessorWrapper from value of config
%s. Please provide a valid class "
+ + "that implements the ProcessorWrapper interface.",
PROCESSOR_WRAPPER_CLASS_CONFIG);
Review Comment:
space is added at the end of the line above (admittedly it's hard to see
this way)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]