John123
John123

Reputation: 101

How establish connection between React JS and Apache Kafka in Spring Boot?

I have a question like in topic. How establish connection between React JS and Apache Kafka in Spring Boot ?

I don't know how connect to Apache Kafka and subscribe topic from React JS front-end.

Can I use this one ? Something like example below:

let socket = new WebSocket("ws://localhost:9092");

Upvotes: 0

Views: 3327

Answers (1)

Matthew O'Riordan
Matthew O'Riordan

Reputation: 8211

I would recommend reading How to stream Kafka messages to Internet-facing clients over WebSockets as that covers off most of what you need to know. Once have you a data stream to your browser, then plugging it into React JS (or perhaps Redux) should be straightforward.

Upvotes: 1

Related Questions