项目作者: santiagoarriaga

项目描述 :
Spring Boot Server-Sent-Events ( SSE ) service with reactive Kafka producer and consumers.
高级语言: Java
项目地址: git://github.com/santiagoarriaga/sse_test.git
创建时间: 2020-08-24T16:39:09Z
项目社区:https://github.com/santiagoarriaga/sse_test

开源协议:GNU General Public License v3.0

下载


sse_test

Spring Boot Server-Sent-Events ( SSE ) service with reactive Kafka producer and consumers.

Install

  • Install Java 10
  • Clone and cd into this repository
  • Run:
  1. mvn install

Test locally

  • Download and install kafka
  • cd into kafka directory
  • In a terminal, run zookeeper:
  1. bin/zookeeper-server-start.sh config/zookeeper.properties
  • In another terminal, run kafka:
  1. bin/kafka-server-start.sh config/server.properties
  • In another terminal, create a test topic:
  1. bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic thl-events
  2. bin/kafka-topics.sh --bootstrap-server localhost:9092 --describe
  • Cd into the sse_test repository, and run the server:
  1. mvn exec:java -Dexec.mainClass="test.Application"
  • Open one or several browser tabs pointing to http://localhost:8080/

  • Use the HTML UI to send and see how messages are received in all of them,
    as messages are multicasted.