KApolinario1120 commented on code in PR #17973:
URL: https://github.com/apache/kafka/pull/17973#discussion_r1876003287


##########
streams/src/main/java/org/apache/kafka/streams/Topology.java:
##########
@@ -74,10 +74,172 @@ protected Topology(final InternalTopologyBuilder 
internalTopologyBuilder) {
      * {@link #addSource(AutoOffsetReset, String, String...) adding a source 
processor} or when creating {@link KStream}
      * or {@link KTable} via {@link StreamsBuilder}.
      */
+    @Deprecated
     public enum AutoOffsetReset {
         EARLIEST, LATEST
     }
 
+    /**
+     * Adds a new source that consumes the specified topics and forwards the 
records to child processor and/or sink nodes.
+     * The source will use the specified {@link 
org.apache.kafka.streams.AutoOffsetReset offset reset policy} if no committed 
offsets are found.
+     *
+     * @param offsetReset the auto offset reset policy to use for this source 
if no committed offsets are found; acceptable values: earliest or latest
+     * @param name the unique name of the source used to reference this node 
when {@link #addProcessor(String, ProcessorSupplier, String...) adding 
processor children}
+     * @param topics the name of one or more Kafka topics that this source is 
to consume
+     * @return itself
+     * @throws TopologyException if a processor is already added or if topics 
have already been registered by another source
+     */
+    public synchronized Topology addSource(final AutoOffsetReset offsetReset,

Review Comment:
   Thanks @mjsax, I wanted to clarify to make sure my understanding is clear. 
Because the legacy AutoOffsetReset and the new class we are implementing share 
the same name, the legacy enum that we mean to replace will be used here 
instead of the new class as we intended?



-- 
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]

Reply via email to