mjsax commented on a change in pull request #8752: URL: https://github.com/apache/kafka/pull/8752#discussion_r438381511
########## File path: streams/src/main/java/org/apache/kafka/streams/Topology.java ########## @@ -645,14 +645,17 @@ public synchronized Topology addSink(final String name, * Add a new processor node that receives and processes records output by one or more parent source or processor * node. * Any new record output by this processor will be forwarded to its child processor or sink nodes. + * The supplier should always generate a new instance each time invoking {@link ProcessorSupplier#get()}. Creating + * a single Processor object and returning the same object reference in {@link ProcessorSupplier#get()} would be + * a violation of the supplier pattern and leads to runtime exceptions. Review comment: Can we add this to all other methods, too? (ie, all that take a supplier, Processor or Transformer?) And maybe also to `ProcessorSupplier#get()` and `TransformerSupplier#get()` -- I think it would be best to provide redundancy :) ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org