feat: Semaine 8

This commit is contained in:
gauvainboiche
2026-05-11 09:25:19 +02:00
parent 606e43e53f
commit 3315cb2336
123 changed files with 5748 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from datetime import datetime, timezone
from uuid import uuid4
import os
TOPIC_ORDERS= "orders"
TOPIC_PAYMENTS= "payments"
TOPIC_NOTIFICATIONS= "notifications"
BOOTSTRAP_SERVERS= os.getenv("BOOTSTRAP_SERVERS", "localhost:9092")
def make_event(event_type: str, payload: dict) -> dict:
return {
"id": str(uuid4()),
"type": event_type,
"timestamp": datetime.now(timezone.utc).isoformat(),
"payload": payload
}