guozhangwang commented on a change in pull request #11705:
URL: https://github.com/apache/kafka/pull/11705#discussion_r813252418



##########
File path: streams/src/main/java/org/apache/kafka/streams/StreamsBuilder.java
##########
@@ -81,14 +81,19 @@ public StreamsBuilder() {
         internalStreamsBuilder = new 
InternalStreamsBuilder(internalTopologyBuilder);
     }
 
-    protected StreamsBuilder(final TopologyConfig topologyConfigs) {
+    /**
+     * Create a {@code StreamsBuilder} instance.
+     *
+     * @param topologyConfigs    the streams configs that apply at the 
topology level. Please refer to {@link TopologyConfig} for more detail
+     */
+    public StreamsBuilder(final TopologyConfig topologyConfigs) {
         topology = getNewTopology(topologyConfigs);
         internalTopologyBuilder = topology.internalTopologyBuilder;
         internalStreamsBuilder = new 
InternalStreamsBuilder(internalTopologyBuilder);
     }
 
     protected Topology getNewTopology(final TopologyConfig topologyConfigs) {

Review comment:
       I think the point is that `TopologyConfig` is currently still in 
`org.apache.kafka.streams.processor.internals.namedtopology`, which is not 
considered a public API. So for the public class `StreamsBuilder` to take it as 
a param, we need to move `TopologyConfig` out of that package in this PR, 
potentially to `org.apache.kafka.streams` as with `StreamsConfig` and 
`StreamsBuilder` classes.
   
   I thought this is included as part of KIP-591 to make `TopologyConfig` as a 
public API (note in 
[KAFKA-13281](https://issues.apache.org/jira/browse/KAFKA-13281), we did not 
make it a public API yet), as "Currently, the internal implementation for 
topology-config is all set. In this KIP, we'll publish the API to allow pass 
the topology-config into StreamBuilder ." already.




-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to