Learning project for learning to use kafka with golang in highload examples.
-
Send POST request
/receipts
to master to begin generating 10m random transactions; -
Sending generated transactions by batches to different partitions;
-
Each consumer receive messages from its individual partition in group;
-
Process transactions:
if transaction.Location == "LPP" || transaction.Amount > 100000 || transaction.TransactionType.String() == "Undefined" || transaction.TransactionType.String() == "RecurringPayment"
-->
transaction marked as cancelled
-
Insert batches of processed transactions to DB.
- Golang 1.20.4
- gin-gonic/gin
- go-gorm/gorm
- sigmentio/kafka-go
- ariga.io/atlas-provider-gorm (for versioned db migrations)
- Docker-Compose
- Kafka Broker
- PostgreSQL
- adapt to mapreduce in consumer
- union general code in external library