title: how to send batched data with Spring Kafka producer
body: <p>Currently I have code like this:</p>
  
  <pre><code>KafkaTemplate&lt;String, String&gt; kafkaTemplate;
  
  List&lt;Pet&gt; myData;
  
  for(Pet p: myData) {
    String json = objectWriter.writeValueAsString(p)
    kafkaTemplate.send(topic, json)
  }
  
  </code></pre>
  
  <p>so each list item is sent one by one.
  How do i send the entire list at once?</p>