Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
org.springframework.kafka spring-kafka-------------spring.kafka.consumer.bootstrap-servers = localhost:9092spring.kafka.consumer.group-id= group_idspring.kafka.consumer.auto-offset-reset = earliestspring.kafka.consumer.key-deserializer= org.apache.kafka.common.serialization.StringDeserializerspring.kafka.consumer.value-deserializer = org.apache.kafka.common.serialization.StringDeserializerspring.kafka.producer.bootstrap-servers = localhost:9092spring.kafka.producer.key-serializer = org.apache.kafka.common.serialization.StringSerializerspring.kafka.producer.value-serializer = org.apache.kafka.common.serialization.StringSerializer--------------- @Autowired KafkaTemplate template; @GetMapping("/test") public String hello() { template.send("testtopic1", "hello world from MS Ricky!! -> "+LocalDateTime.now()); return "hello "+ LocalDateTime.now(); }
org.springframework.kafka
spring-kafka
-------------
spring.kafka.consumer.bootstrap-servers = localhost:9092
spring.kafka.consumer.group-id= group_id
spring.kafka.consumer.auto-offset-reset = earliest
spring.kafka.consumer.key-deserializer= org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.value-deserializer = org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.producer.bootstrap-servers = localhost:9092
spring.kafka.producer.key-serializer = org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer = org.apache.kafka.common.serialization.StringSerializer
---------------
@Autowired
KafkaTemplate template;
@GetMapping("/test")
public String hello() {
template.send("testtopic1", "hello world from MS Ricky!! -> "+LocalDateTime.now());
return "hello "+ LocalDateTime.now();
}