- Kafka installed on your system
- Frontend application running on
localhost:8080
- Open Command Prompt or Terminal.
- Navigate to the Kafka directory.
- Run the following command to create a Kafka topic named
chatz
:This command will create a topic namedbin\windows\kafka-topics.bat --create --topic chatz --partitions 3 --replication-factor 1 --bootstrap-server localhost:9092
chatz
with 3 partitions and a replication factor of 1.
If the frontend generates the wrong client ID, follow these steps:
- Open a web browser.
- Enter the following URL in the address bar:
http://localhost:8080/fetchPendingMessages?clientId=2
Replace 2
with the correct client ID of the disconnected websocket.
- If you encounter any issues during setup, refer to the Kafka documentation or the frontend application's documentation for troubleshooting steps.
- Ensure that all dependencies are installed and configured correctly before running the application.
- Make sure Kafka is running and accessible on
localhost:9092
. - Verify that the frontend application is configured to connect to the correct Kafka server and topic.