Hey Jeremiah, >> Please only use that MessageCollector object for sending messages, and don't use it outside of the call to window(). Why MessageCollector should not be used outside the call to window() in a WindowableTask?
The collector and coordinator instances are expected to be used within a context of a single window call. All this means is that a window should not make any assumptions that the same instance of the collector will be provided across invocations. >> Does this mean I should not pass MessageCollector around as a method argument to child objects responsible for processing the window()? As long as those objects/helper methods are scoped within a single window call, it should be fine. Can you please provide some background on what you are trying to do? Thanks, Jagadish On Tue, Jun 5, 2018 at 6:55 AM, Jeremiah Adams <jad...@helixeducation.com> wrote: > From th?e docs: > > > "If you need to send messages to output streams, you can use the > MessageCollector<http://samza.apache.org/learn/documentation/0.14/api/ > javadocs/org/apache/samza/task/MessageCollector.html> object passed to > the window() method. Please only use that MessageCollector object for > sending messages, and don't use it outside of the call to window()." > > > Why MessageCollector should not be used outside the call to window() in a > WindowableTask? > > Does this mean I should not pass MessageCollector around as a method > argument to child objects responsible for processing the window()? > > > Jeremiah Adams > Software Engineer > www.helixeducation.com<http://www.helixeducation.com/> > Blog<http://www.helixeducation.com/blog/> | Twitter<https://twitter.com/ > HelixEducation> | Facebook<https://www.facebook.com/HelixEducation> | > LinkedIn<http://www.linkedin.com/company/3609946> > -- Jagadish V, Graduate Student, Department of Computer Science, Stanford University