mynameborat commented on a change in pull request #984: Samza 2116: Making sink, sendTo(table), sendTo(stream) non-terminal URL: https://github.com/apache/samza/pull/984#discussion_r272005397
########## File path: samza-api/src/main/java/org/apache/samza/operators/MessageStream.java ########## @@ -117,8 +117,9 @@ * Samza SystemProducer implementation. * * @param sinkFn the function to send messages in this stream to an external system + * @return the input {@link MessageStream} */ - void sink(SinkFunction<? super M> sinkFn); + MessageStream<M> sink(SinkFunction<? super M> sinkFn); Review comment: Can we add more documentation around what message is propagated to the downstream operators and its characteristics within the scope of the `SinkFunction`? - E.g. It is immutable within the scope of the sink function. - When is the message propagated to the downstream? Is it after the completion of SinkFunction? What if the sink function is asynchronous like remote call or kafka send? Do we guarantee any sort of happens before? ---------------------------------------------------------------- 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 With regards, Apache Git Services