Envelope: Communication Servisi
Topic: qapu.communication
DLQ: qapu.dlq.communication
Producer: communication-service
Communication servisi, SMS/e-posta/push/WhatsApp gibi çok kanallı bildirim gönderimleri için tekil çıkış noktasıdır. Başarılı gönderimde communication.sent.v1, hata durumunda communication.failed.v1 üretilir.
Event Envanteri
| Event | Ne zaman üretilir? | Consumer | Amaç |
|---|---|---|---|
communication.sent.v1 | Bildirim başarıyla gönderildiğinde | Action Servisi, Ledger | Teyit ve denetim kaydı |
communication.failed.v1 | Gönderim hatayla sonlandığında | Observer | Hata görünürlüğü ve retry kararı |
communication.sent.v1
Özet
| Başlık | Değer |
|---|---|
| Topic | qapu.communication |
| Producer | communication-service |
| Consumer | Action Servisi (teyit için), Ledger Servisi |
| Tetikleyici | action.execute.requested.v1 tüketimi — gönderim başarılı olduğunda |
| Kritiklik | Orta — aksiyon döngüsünü kapatır |
Payload
{
"event": "communication.sent.v1",
"meta": {
"trace_id": "01a2b3c4d5e6f7g8h9i0",
"producer_service": "communication-service",
"produced_at": "2026-03-11T15:22:16.500Z",
"process_ms": 1200
},
"context": {
"device_id": "400000011D081B70",
"raw_id": 12345,
"stream_id": 9823412,
"device_time": "2026-03-11T15:22:06Z",
"stream_time": "2026-03-11T15:22:16Z",
"iccid": null,
"imei": null,
"firmware": null
},
"data": {
"action_id": "act_9823412_001",
"channel": "sms",
"recipient": "+905XX000000",
"template_id": "voltage_high_warning",
"provider": "netgsm",
"provider_message_id": "netgsm_ref_7743921",
"sent_at": "2026-03-11T15:22:16.450Z"
},
"error": null
}
Alan Açıklamaları
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
data.action_id | string | Evet | İlgili aksiyon tanımlayıcısı |
data.channel | string | Evet | sms | email | push | whatsapp |
data.provider | string | Hayır | Kullanılan gönderim sağlayıcısı (ör. netgsm, sendgrid) |
data.provider_message_id | string | Hayır | Sağlayıcının döndürdüğü referans kimliği |
data.attempt | integer | Hayır | Bu eventi üreten gönderim denemesi sayısı (varsa) |
error.failed_stage | string | Evet | Sabit: communication |
error.error_code | string | Evet | Hata kodu (COMM_PROVIDER_REJECTION vs.) |
error.error_message | string | Evet | İnsan okunur hata açıklaması |
error.failed_at | datetime | Evet | Hata oluşum zamanı |
communication.failed.v1
Özet
| Başlık | Değer |
|---|---|
| Topic | qapu.communication |
| Producer | communication-service |
| Consumer | Observer Servisi |
| Kritiklik | Orta — bildirim ulaşmadı; Observer retry/eskalasyon kararı verir |
Payload
{
"event": "communication.failed.v1",
"meta": {
"trace_id": "01a2b3c4d5e6f7g8h9i1",
"producer_service": "communication-service",
"produced_at": "2026-03-11T15:22:16.700Z",
"process_ms": 5050
},
"context": {
"device_id": "400000011D081B70",
"raw_id": 12345,
"stream_id": 9823412,
"device_time": "2026-03-11T15:22:06Z",
"stream_time": "2026-03-11T15:22:16Z",
"iccid": null,
"imei": null,
"firmware": null
},
"data": {
"action_id": "act_9823412_001",
"channel": "sms",
"recipient": "+905XX000000",
"provider": "netgsm",
"attempt": 3
},
"error": {
"failed_stage": "communication",
"error_code": "COMM_PROVIDER_REJECTION",
"error_message": "Provider returned HTTP 429: rate limit exceeded",
"failed_at": "2026-03-11T15:22:16Z"
}
}
Alan Açıklamaları
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
data.attempt | integer | Hayır | Bu eventı üreten gönderim denemesi sayısı (varsa) |
error.retryable | boolean | Evet | true ise Observer gecikme ile yeniden deneyebilir |