Kafka
Topics found in the repository
| Topic | Producer | Consumer |
|---|---|---|
order-created | order-service | notification-service, analytics-service |
payment-success | payment-service | order-service |
payment-failed | payment-service | analytics-service |
payment-completed | none in current code | analytics-service |
Event schemas
order-created
orderIduserIdemailtotalAmountitems[]firstNamephoneNumberstatus
payment-success
paymentIdcheckoutIduserIdtransactionIdamountitems[]emailfirstNamephoneNumber
payment-failed
paymentIdcheckoutIduserIdtransactionIdamount
Checkout/event flow
Retry / delivery notes
- Producers use Spring Kafka
KafkaTemplate payment-servicewaits on.get()for publish success/failureorder-servicepublishes after transaction commit usingTransactionSynchronizationManageranalytics-serviceadds an application-level deduplication table viaprocessed_events
Known inconsistency
analytics-service listens for payment-completed, but payment-service publishes payment-success. Documentation intentionally keeps this mismatch visible because it exists in the repository today.