title: Can we have sequential processing of messages with Kafka Streams API?
body: <p>We have some messages which we need to maintain sequence for. We have decided to send all messages from a particular source to a partition, so that sequence of messages will be maintained (<em>multiple sources can produce to the same partition but a source cannot produce to multiple partitions</em>) and we will be able to identify each source with their key.</p>
  
  <p>Now, we need to consume those messages and do some processing. We do multiple independent operations on the messages what we have consumed (for example, storing them in the database, forwarding them etc).
  Now, I am stuck with whether to use the Kafka Streams API or Consumer API for this.</p>
  
  <p>Note: I cannot have large number of topics (for example, I cannot create a topic for each source as the sources will be numerous). Though I can group messages by key to identify the source, for using Streams, what I want is the order of messages for a key.</p>
  
  <p>Usecase: I want to commit those messages into a database <strong>in order</strong> and I want to forward those messages <strong>in order</strong>.</p>
  
  <p>So how can I process the messages in order using Streams API?</p>