title: What purpose do tasks in Kafka streams API serve
body: <p>I am trying to understand the architecture of Kafka streams API and came across this in the <a href="https://kafka.apache.org/10/documentation/streams/architecture" rel="nofollow noreferrer">documentation</a>:</p>
  
  <blockquote>
    <p>An application's processor topology is scaled by breaking it into multiple tasks</p>
  </blockquote>
  
  <p>What are all the criteria to break up the processor topology into tasks? Is it just the number of partitions in the stream/topic or something more.</p>
  
  <blockquote>
    <p>Tasks can then instantiate their own processor topology based on the assigned partitions</p>
  </blockquote>
  
  <p>Can someone explain what the above means with an example? If the tasks are created only with the purpose of scaling, shouldn't they all have the same topology? </p>