Spring Kafka Producer not sending to Kafka 1.0.0 (Magic v1 does not support record headers)

后端 未结 4 2200
青春惊慌失措
青春惊慌失措 2021-02-14 04:08

I am using this docker-compose setup for setting up Kafka locally: https://github.com/wurstmeister/kafka-docker/

docker-compose up works fine, creating topi

4条回答
  •  春和景丽
    2021-02-14 04:37

    Solved. The problem is neither the broker, some docker cache nor the Spring app.

    The problem was a console consumer which I used in parallel for debugging. This was an "old" consumer started with kafka-console-consumer.sh --topic=topic --zookeeper=...

    It actually prints a warning when started: Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-server] instead of [zookeeper].

    A "new" consumer with --bootstrap-server option should be used (especially when using Kafka 1.0 with JsonSerializer). Note: Using an old consumer here can indeed affect the producer.

提交回复
热议问题