Skip to content

Kafka producer integration for transaction event streaming #22

Description

@Teboho66

Description

The A3 architecture specifies Apache Kafka as the event backbone. This
issue adds a Kafka producer to the transaction submission endpoint so
that every accepted transaction is published to transactions.raw.

Tasks

  • Add confluent-kafka to requirements.txt
  • Create infrastructure/kafka_producer.py
  • Publish to transactions.raw after TransactionService.submit_transaction()
  • Add Kafka to docker-compose.yml (Kafka + Zookeeper)
  • Add integration test verifying message is produced

Acceptance Criteria

  • POST /api/transactions publishes event to transactions.raw
  • Message contains tokenised payload (no raw PII — BR-T2)
  • If Kafka is unavailable, the API still accepts the transaction
    (graceful degradation)

Metadata

Metadata

Assignees

Projects

Status
Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions