Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 2.43 KB

kafka-streams-internals-TaskCreator.adoc

File metadata and controls

48 lines (34 loc) · 2.43 KB

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)
Note
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…​FIXME

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