Sample fraud detection app using Python and Kafka with Docker for service management
Spin the Kafka cluster
docker-compose -f docker-compose.kafka.yml up
Spin the app cluster that contains both generator and detector
docker-compose up
Use the below command to check the messages being published to a certain topic
docker-compose -f docker-compose.kafka.yml exec broker kafka-console-consumer --bootstrap-server localhost:9092 --topic queueing.transactions --from-beginning
docker-compose -f docker-compose.kafka.yml exec broker kafka-console-consumer --bootstrap-server localhost:9092 --topic streaming.transactions.fraud
docker-compose -f docker-compose.kafka.yml exec broker kafka-console-consumer --bootstrap-server localhost:9092 --topic streaming.transactions.legit
To bring down kafka cluster docker-compose -d docker-compose.kafka.yml down
To bring down project
docker-compose down
To remove project network
docker network rm kafka-network