Interface StreamTask

public interface StreamTask

A StreamTask is the basic class on which Samza jobs are implemented. Developers writing Samza jobs begin by
implementing this class, which processes messages from the job's input streams and writes messages out to
streams via the provided MessageCollector. A StreamTask may be augmented by
implementing other interfaces, such as InitableTask, WindowableTask,
or ClosableTask.

The methods of StreamTasks and associated other tasks are guaranteed to be called in a single-threaded fashion;
no extra synchronization is necessary on the part of the class implementer. References to instances of
IncomingMessageEnvelopes,MessageCollectors, and
TaskCoordinator should not be held onto between calls; there is no guarantee that
these will not be invalidated or otherwise used by the framework.

process

envelope - Contains the received deserialized message and key, and also information regarding the stream and
partition of which the message was received from.

collector - Contains the means of sending message envelopes to the output stream. The collector must only
be used during the current call to the process method; you should not reuse the collector between invocations
of this method.

coordinator - Manages execution of tasks.

Throws:

java.lang.Exception - Any exception types encountered during the execution of the processing task.