title: How to store data on topic which will be passed as a message through producer, such that it can loaded to database on respective columns
body: <p>I followed <a href="https://www.confluent.io/blog/apache-kafka-spring-boot-application/?utm_medium=sem&amp;utm_source=bing&amp;utm_campaign=ch.sem_br.nonbrand_tp.rmkt_tgt.kafka_mt.xct_rgn.india_lng.eng_dv.all_con.kafka-spring&amp;utm_term=spring%20kafka&amp;creative=&amp;device=c&amp;placement=&amp;msclkid=fb574f0256621aec4fb22e2787e3e53d" rel="nofollow noreferrer">this blog</a> to produce a message on to topic using kafka spring so far.</p>
  <p>The message I'm going to pass is just the name and now I would like to stream through this topic and add incremental value as ID along with name and store it on <code>OutputTopic</code> and now, I would like to store data to cassandra.</p>
  <p>My table structure in cassandra as follows:-</p>
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE emp(
     emp_id int PRIMARY KEY,
     emp_name text,
     )
  </code></pre>
  <p>In which format the data should be on output topic so that I can easily store it on cassandra table?</p>
  <p>How can I achieve the above functionality?</p>