"\\W+"))
    .groupBy((_, word) => word)
    .count()(Materialized.as("counts-store"))
  wordCounts.toStream.to("WordsWithCountsTopic")

  val streams: KafkaStreams = new KafkaStreams(builder.build(), props)
  streams.start()

  sys.ShutdownHookThread {
     streams.close(10, TimeUnit.SECONDS)
  }
}</code></pre>
           </div>
       </div>

       <div class="pagination">
           <a href="/{{version}}/documentation" class="pagination__btn pagination__btn__prev">Previous</a>
           <a href="/{{ver