TaskCreator — Factory of Stream Processor Tasks (StreamTasks)

TaskCreator is a concrete task factory of stream processor tasks (StreamTasks).

TaskCreator is created exclusively for StreamThread (activeTaskCreator) for the only purpose of creating the TaskManager.

Creating TaskCreator Instance

TaskCreator takes the following to be created:

Creating Stream Task — createTask Factory Method

StreamTask createTask(
  Consumer<byte[], byte[]> consumer,
  TaskId taskId,
  Set<TopicPartition> partitions)
createTask is part of AbstractTaskCreator Contract to create a concrete stream processor task.

createTask requests the taskCreatedSensor to record this execution.

createTask then creates a StreamTask (for a given topic group ID and a producer client for the task).

createProducer Internal Method

Producer<byte[], byte[]> createProducer(final TaskId id)


createProducer is used exclusively when TaskCreator is requested to create a stream processor task (for a task ID).

results matching ""

    No results matching ""