### Question:
Demo08Producer { public SendResult syncSend(Integer id) throws ExecutionException, InterruptedException { Demo08Message message = new Demo08Message(); message.setId(id); return kafkaTemplate.send(Demo08Message.TOPIC, message).get(); }  SendResult syncSend(Integer id);  }### Answer:
@Test public void testSyncSend() throws ExecutionException, InterruptedException { for (int id = 1; id <= 2; id++) { SendResult result = producer.syncSend(id); logger.info("[testSyncSend][发送编号：[{}] 发送结果：[{}]]", id, result); } new CountDownLatch(1).await(); }