import org.springframework.util.concurrent.ListenableFuture;
+// tag::supersimple[]
@Slf4j
@SpringBootApplication
public class Application implements ApplicationRunner
{
for (int i = 0; i < 100; i++)
{
+ // end::supersimple[]
// tag::callback[]
ListenableFuture<SendResult<String, String>> listenableFuture =
kafkaTemplate.send("test", Long.toString(i%10), Long.toString(i));
result.getRecordMetadata().offset()),
e -> log.error("ERROR sendig message", e));
// end::callback[]
+ // tag::supersimple[]
}
}
SpringApplication.run(Application.class, args);
}
}
+// end::supersimple[]