Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

kafka-producer-consumer-with-spring-boot

NotificationsYou must be signed in to change notification settings

SelimHorri/kafka-boot

Repository files navigation

kafka-producer-consumer-with-spring-boot

Simple Spring Boot app to consume the published message into a Kafka topic through a simple Rest API:/messages/publish/{msg}

 _   __         __  _           ______                _   | | / /        / _|| |          | ___ \              | |  | |/ /   __ _ | |_ | | __  __ _ | |_/ /  ___    ___  | |_ |    \  / _` ||  _|| |/ / / _` || ___ \ / _ \  / _ \ | __|| |\  \| (_| || |  |   < | (_| || |_/ /| (_) || (_) || |_ \_| \_/ \__,_||_|  |_|\_\ \__,_|\____/  \___/  \___/  \__|Supersonic Java with Spring Boot ☕️💚

Kafka producer

  • Launch Zookeeper server
${KAFKA_HOME}/bin/zookeeper-server-start.sh${KAFKA_HOME}/config/zookeeper.properties
  • Launch Kafka server
${KAFKA_HOME}/bin/kafka-server-start.sh${KAFKA_HOME}/config/server.properties
  • Create new Topic called 'NewTopic'
${KAFKA_HOME}/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic NewTopic --from-beginning

Kafka consumer (optional)

  • Launch a consumer message streamer
${KAFKA_HOME}/bin/kafka-console-producer --broker-list localhost:9092 --topic NewTopic

[8]ページ先頭

©2009-2025 Movatter.jp