Sunbird Lern
AskDot
  • LEARN
    • Overview
    • Functional Capabilities
    • Technical Architecture
      • Technical Architecture Diagram
      • Tech Stack
    • Dependencies
    • Product Roadmap
  • USE
    • Overview
    • Release Notes
      • Release V 8.0.0 (Ongoing)
      • Release V 7.0.0
      • Release V 5.4.0
      • Release V 5.3.0
      • Release V 5.2.0
      • Release V 5.1.0
      • Release V 5.0.1
      • Release V 5.0.0
      • Release V 4.10.0
      • Release V 4.9.0
      • Release V 4.8.0
      • Release V 4.7.0
    • Developer Guide
      • USER & ORG SERVICE
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Keycloak Local setup
          • Additional Installation Dependencies:
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
              • User
              • Organisation
              • System Settings
              • Role
              • Bulk Upload Process
              • Tenant Preference
              • Cassandra Migration Version
              • User Consent
              • Email Template
              • OTP
              • Page Management (LMS Service)
              • Location
              • User Notes
              • Deprecated
          • Elastic Search
          • Redis
        • APIs
          • User Management
            • User Deletion API
            • Ownership Transfer API
          • Organisation Management
          • Location Management
          • Consent Management
          • OTP Services
          • Tenant Configurations
          • Bulk Upload
          • System Settings
          • API Management Service
          • Data Sync
          • Notification APIs
        • Flink Jobs
          • User Cache Updater
          • User Deletion Cleanup Flink Job
          • Ownership Transfer Flink Job
        • Reports
          • Standard Exhaust
            • State Admin Geo report
            • State Admin Report
          • Other Jobs
            • User Cache Indexer Job
            • Delete Users Assets Report
          • Data Products Developer Installation
            • System Requirements
            • Tech Stack
            • Installation Dependencies
            • Local installation of data-products
            • Server setup Guide
            • Installation Configuration
            • Data-product creation guide
            • Troubleshooting a data-product
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
          • System Settings
          • Email Configuration
          • SMS Configuration
          • OTP based SMS Configuration
        • Roles
          • System Roles
          • User Roles
          • RBAC
        • Dependencies
        • Keycloak on Sunbird
        • How to Guide
          • Create Organization
          • Create User
          • Add new user type & location
        • Single Sign-on with Sunbird
        • Caching and Denormalising User Metadata
          • ETLUserCacheUpdaterJob
          • UserCacheUpdaterFlinkJob
        • Unit Tests and Code Coverage
        • FAQs
      • LMS(BATCH) SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
        • Data Models
          • Cassandra
            • Data Dictionary
          • ElasticSearch
          • Redis
        • APIs
        • Flink Jobs
          • Merge User Courses
          • Relation Cache Updater
          • Activity Aggregate Updater
          • Assessment Aggregator
          • Enrolment Reconciliation
          • Collection Certificate Pre-Processor
          • Collection Certificate Generator
        • Reports
          • On-Demand Exhaust
            • Response Exhaust
            • User Info Exhaust
            • Progress Exhaust
          • Other Jobs
            • Collection Summary Job
            • Course Batch Status Updater Job
            • Cassandra Migrator Job
            • Score Metric Migration Job
            • Assessment Score Correction Job
            • Collection Reconciliation Job
            • Course Enrollment Job
            • Course Consumption Job
        • Logs, Telemetry Events
        • Configuration
          • System Configuration
          • Functional Configuration
        • Dependencies
        • Certificate Registry and Credentialing using Sunbird-RC
          • Configuring PublicKey in Sunbird-RC
          • Server Setup guide for Sunbird-RC
          • API Guide For Sunbird-RC
        • Certificate Flow
          • Certificates Creation and Configuration
        • FAQs
      • GROUPS
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Cassandra
            • Data Dictionary
          • Redis
        • APIs
          • Create Group
        • Logs, Telemetry Events
          • UI Telemetry Events
          • Service Telemetry Events
        • Configuration
          • Functional Configurations
        • Design References
        • Dependencies
        • Unit Tests and Code Coverage
      • NOTIFICATION SERVICE
        • Features/Core Capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
          • Source Code
          • Installation Configuration
        • Data Models
          • Data Dictionary
        • APIs
        • Flink Jobs
        • Logs, Telemetry Events
        • Configuration
          • Functional Configurations
        • Dependencies
        • Unit Tests and Code Coverage
      • DISCUSSION FORUM
        • Features/Core capabilities
        • Architecture
          • Code Flow
        • Developer Installation
          • System Requirements
          • Tech Stack
          • Installation Guide
            • Nodebb setup
            • Discussion Middleware Setup
            • Discussion Middleware
            • Discussion forum integration with any application
            • Discussion-UI setup along with demo application.
            • Sunbird-lern portal for DF
          • Source Code
        • APIs
          • Category APIs
          • User APIs
          • Post APIs
          • Topic APIs
          • Forum APIs
        • Context Schema
        • Configurations
          • Nodebb Admin panel settings
          • Discussion MW & Nodebb System Config
        • Telemetry Events
        • Dependencies
      • ML SERVICE
        • DATA PIPELINE (Flink Jobs)
          • Program User Info
            • Component Diagram
            • Data Model
            • Folder Structure
          • Ml User Delete
            • Component Diagram
            • Data Model
            • Folder Structure
        • DATA PRODUCTS
          • Program Exhaust
            • Component Diagram
            • Folder Structure
    • Server Installation
    • Dependency Setup
    • Deprecation
      • Release-5.4.0
    • Jenkins Jobs
    • Release Calendar
    • Learn More
      • Tech References
      • Telemetry Processing
      • Data Dictionary
        • Sample Data
      • Delete User Functionality
      • Asset Ownership Transfer
    • FAQs
  • Engage
    • Discuss
    • Contribute to Sunbird Lern
    • Raise an Issue
    • Contribution Guidelines
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. USE
  2. Developer Guide
  3. NOTIFICATION SERVICE

Flink Jobs

PreviousAPIsNextLogs, Telemetry Events

Last updated 1 year ago

Was this helpful?

Notification Service has a flink job which helps in sending asynchronous notifications.

Notification Job

'notification-job' is used to send notifications in an asynchronous mode via SMS, eMail and FCM channels.

Additional Reading:

Configuration variables:

Variable
Default Value
Purpose

kafka.input.topic

{{env}}.lms.notification

Kafka topic from which messages/events are read to be processed.

kafka.groupId

{{env}}.lms.notification.group

Kafka input topic group Id

fcm_account_key

Firebase Cloud Messaging

sms_auth_key

SMS Service Authentication key

sms_default_sender

SMS sender name (it must be 6 character only)

mail_server_from_email

eMail Server

mail_server_username

eMail server username

mail_server_password

eMail server password

mail_server_host

eMail server host Ip

mail_server_port

eMail server port

Sample event:

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"
  }
}

Source code:

https://project-sunbird.atlassian.net/wiki/spaces/UM/pages/1057980431/Notification+service
data-pipeline/notification/notification-job at release-5.3.0 · Sunbird-Lern/data-pipelineGitHub
Logo