We are using Kafka cluster for sending/receiving messages at real time. We are able to publish messages to Kafka topics successfully. Now we want to receive these messages real time on a Single Page Application (SPA) running on a web browsers using JavaScript. Is it possible to push messages to SPA running on latest version any famous browser directly from Kafka? I found examples of receiving messages realtime using NodeJS but none with the JavaScript running on web browser.
Apache Kafka is used for both real-time and batch data processing, and is the chosen event log technology for Amadeus microservice-based streaming applications. Kafka is also used for operational use cases such as application logs collection.
kafka-websocket is a simple websocket server interface to the kafka distributed message broker. It supports clients subscribing to topics, including multiple topics at once, and sending messages to topics. Messages may be either text or binary, the format for each is described below.
Kafka monitors all data communication in near real-time to implement access control, detect anomalies, and provide secure communication. This architecture enables the integration with non-connected legacy systems to collect sensor data but also ensures that no external system gets access to the unsecured machines.
There are Javascript clients for Kafka but given the description of your use case I would recommend you either use a REST or WebSocket proxy between your browser side javascript and Kafka. That will ensure the message can traverse any intermediate firewalls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With