1 package de.example.spring.kafka;
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5 import org.springframework.cloud.stream.annotation.EnableBinding;
6 import org.springframework.cloud.stream.annotation.StreamListener;
7 import org.springframework.cloud.stream.messaging.Sink;
9 @EnableBinding(Sink.class)
10 public class Receiver {
11 private static final Logger LOGGER = LoggerFactory.getLogger(Receiver.class);
13 @StreamListener(Sink.INPUT)
14 public void handle(String message) {
15 LOGGER.info("received message='{}'", message);