-
Have the Producer and Comms components available locally.
-
Update the producer’s main.py:
api_url = "http://localhost:8000/receive" # For testing locally
-
Install Python dependencies:
pip install -r requirements.txt
Run Kafka locally using Docker:
docker run -p 9092:9092 apache/kafka:4.1.1
Run the receiver module:
uvicorn receiver:app --reload --host 0.0.0.0 --port 8000
You can verify that messages are being received either by:
-
Using curl:
curl -X POST http://localhost:8000/receive
-H "Content-Type: application/json"
-d '{"data": {"test": 123}}' -
Running the producer script to send data (be sure to have the datasets where needed):
python3 [producer-folder]/src/main.py
- Provide a solid test set.
- Implement additional filters for incoming data if required.