Notification Service has a flink job which helps in sending asynchronous notifications.
'notification-job' is used to send notifications in an asynchronous mode via SMS, eMail and FCM channels.
SAMPLE EVENT 1:
{
"actor": {
"id": "BroadCast Topic Notification",
"type": "System"
},
"eid": "BE_JOB_REQUEST",
"edata": {
"request": {
"notification": {
"config": {
"sender": "support@sunbird.com",
"subject": "Completion certificate"
},
"deliveryType": "message",
"mode": "email",
"template": {
"data": "Hi",
"params": {
"body": "email body",
"stateImgUrl": "https://sunbirddev.blob.core.windows.net/orgemailtemplate/img/File-0128212938260643843.png",
"firstName": "Hari",
"regards": "Minister of Humar Resources",
"TraningName": "test-cert-notification",
"regardsperson": "Chairperson",
"heldDate": "16-12-2019"
}
},
"ids": [
"harip@test.in"
]
}
},
"action": "broadcast-topic-notification-all",
"iteration": 2
},
"trace": {
"X-Request-ID": null,
"X-Trace-Enabled": "false"
},
"context": {
"pdata": {
"ver": "1.0",
"id": "org.sunbird.platform"
}
},
"mid": "NS.1646230422793.70c10f26-631b-4d55-8aaa-fbe52b79cbc1",
"object": {
"id": "93a06b829d13c9fa797ea641f484e5d38ce28868fbd75014852cbe413515177c",
"type": "TopicNotifyAll"
}
}
SAMPLE EVENT 2:
{
"actor": {
"id": "BroadCast Topic Notification",
"type": "System"
},
"eid": "BE_JOB_REQUEST",
"mid": "NS.1657555782237.a0603d3a-f668-47e1-940f-4620786f029b",
"trace": {
"X-Request-ID": null,
"X-Trace-Enabled": "false"
},
"ets": 1657555782237,
"edata": {
"action": "broadcast-topic-notification-all",
"iteration": 1,
"request": {
"notification": {
"mode": "phone",
"deliveryType": "message",
"config": {
"sender": null,
"topic": null,
"otp": null,
"subject": null
},
"ids": [
"8050688698"
],
"template": {
"id": null,
"data": "You have successfully completed Sunbird training.",
"params": {
"courseName": "Sunbird training"
}
},
"rawData": null
}
}
},
"context": {
"pdata": {
"ver": "1.0",
"id": "org.sunbird.platform"
}
},
"object": {
"id": "f5e7243feabb343b029f154341c2d55dacb92febb0c1b0349ee0676a02c9b816",
"type": "TopicNotifyAll"
}
}