Episode 08: Configuring & Running both spring and kafka from docker (wurstmeister/kafka)

preview_player
Показать описание
In this episode we are going to configure wurstmeister/kafka and spring boot application, the video includes the following
- Configuring spring boot and wurstmeister/kafka docker
- Using command to set host
- Dynamic IP to set the hostname for the container
- Solving network error for wurstmeister/kafka and spring boot
- Running spring producer and testing through console consumer

Introduction to the project:

Github link:
Рекомендации по теме
Комментарии
Автор

man you really saved me thank you so so much hope you the best

riadouzane
Автор

It's a very good and important series you have started. A lot of people who never got a chance to work on microservices or similar systems, but wanna learn, will gain a lot from this tutorial series. Keep it up :)

mon-rfqy
Автор

Hi Joydeep, I'm having an error in zookeeper and Kafka connection( ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer kafka | Timed out waiting for connection while in state: CONNECTING). using same configuration as yours in one yml file(kafka and zk). Also, my bridge gateway(IP) is the same as yours and network_mode: bridge. using latest images of wurstmeister/kafka and zookeeper. can suggest what I'm doing wrong?
environment:
HOSTNAME_COMMAND: "ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $$1}'"
KAFKA_ZOOKEEPER_CONNECT: 172.17.0.1:2181

imnishantsharma
Автор

Hi Joydeep, I have a Query. In this, you are putting an IP instead of Localhost in the application.properties file. If I remove the container and create it again that IP will change. Is there any other way around?

imnishantsharma
Автор

Hi Joydeep, I tried this command on mac: ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2
but it returns empty instead of IP address. Could you please check and let me know.

AshishKumar-vfuq