Reputation: 93
I started to investigate Kafka couple of days ago. I read a lot of articles on web and then I just wanted to try it manually. So I found this article https://www.confluent.io/blog/apache-kafka-spring-boot-application/
But it does not work for me. Spring boot started but I have such messages in my log:
What can be the reason of those messages and how can I fix it?
When I perform this query:
curl -X POST -F 'message=test' http://localhost:9000/kafka/publish
I see that Producer sends the message but Consumer does not obtain for some reason.
And one more question. In article they send message to the "users" topic but it never declared anywhere in the code. How it is possible?
Upvotes: 0
Views: 189
Reputation: 74
You must verify start kafka and zookeeper, in this article i don't see that. Simple way to start kafka server is docker-compose, for example https://github.com/wurstmeister/kafka-docker/blob/master/docker-compose.yml. After that need to check ports for connection in your spring boot app and on kafka server.
Upvotes: 1