Issue #SBCOSS-778 feat: Added Activity Aggregator API #646
Merged
maheshkumargangula merged 17 commits intoSunbird-Lern:developfrom Feb 9, 2026
Merged
Issue #SBCOSS-778 feat: Added Activity Aggregator API #646maheshkumargangula merged 17 commits intoSunbird-Lern:developfrom
maheshkumargangula merged 17 commits intoSunbird-Lern:developfrom
Conversation
Moved Cassandra operations and response message population outside the conditional block in ContentConsumptionActor. This ensures these actions are performed regardless of the workflow path, improving consistency in content consumption handling. Also added .DS_Store to .gitignore.
Updated the default value of 'enable_module_aggregation' to true when the config is not set, enabling module aggregation by default.
…ttern from enrolment-actor module
There was a problem hiding this comment.
Pull request overview
Adds a new “Activity Aggregator” feature to the LMS service, exposing an API endpoint that routes activity consumption updates to a dedicated Pekko actor/module (with Redis-backed graph reads + optional dedup + Cassandra updates).
Changes:
- Introduces new
activity-aggregatorMaven module with actor/util/domain code and tests. - Wires the new actor into the Play service (dependency, actor binding, router deployment config, and a new
/v1/activity/aggroute/controller + request validator). - Updates existing consumption flow to optionally route events to the new Activity Aggregator actor (feature-flag based) and adjusts related unit tests/utilities.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
pom.xml |
Adds activity-aggregator as a reactor module. |
service/pom.xml |
Adds activity-aggregator as a service dependency (with exclusions). |
service/conf/routes |
Adds HTTP route for the Activity Aggregator API. |
service/conf/application.conf |
Adds Pekko deployment/router config for activity-aggregator-actor. |
service/app/util/ACTOR_NAMES.java |
Registers the new actor for DI/binding. |
service/app/modules/StartModule.java |
Binds RedisCacheUtil for injection usage by the new actor/utilities. |
service/app/controllers/activityaggregate/ActivityAggregateController.java |
New controller endpoint to forward requests to the actor. |
service/app/controllers/activityaggregate/validator/ActivityAggregateRequestValidator.java |
Validates incoming Activity Aggregate update requests. |
course-mw/sunbird-util/.../JsonKey.java |
Adds completedcount / viewcount keys. |
course-mw/sunbird-util/.../ActorOperations.java |
Adds UPDATE_ACTIVITY_AGGREGATES operation. |
course-mw/sunbird-util/cache-utils/.../RedisCacheUtil.scala |
Adds getList(key, database) helper used by the new Redis util. |
course-mw/enrolment-actor/.../ContentConsumptionActor.scala |
Adds optional routing to ActivityAggregatorActor (feature flag) and wires new actor ref. |
course-mw/enrolment-actor/.../CourseConsumptionActorTest.scala |
Updates tests to pass the additional actor dependency and adjusts mocks. |
activity-aggregator/pom.xml |
New module build definition and dependencies. |
activity-aggregator/src/main/.../* |
New actor + util + domain implementation for activity aggregation. |
activity-aggregator/src/test/.../* |
New unit tests for aggregator actor and utility logic. |
.gitignore / activity-aggregator/.gitignore |
Adds .DS_Store and module ignores. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
activity-aggregator/src/main/scala/org/sunbird/activity/util/ActivityAggregateUtil.scala
Outdated
Show resolved
Hide resolved
activity-aggregator/src/main/scala/org/sunbird/activity/actor/ActivityAggregatorActor.scala
Outdated
Show resolved
Hide resolved
activity-aggregator/src/main/scala/org/sunbird/activity/util/DeDupUtil.scala
Show resolved
Hide resolved
...se-mw/enrolment-actor/src/test/scala/org/sunbird/enrolments/CourseConsumptionActorTest.scala
Outdated
Show resolved
Hide resolved
service/app/controllers/activityaggregate/ActivityAggregateController.java
Outdated
Show resolved
Hide resolved
activity-aggregator/src/main/scala/org/sunbird/activity/util/ActivityAggregateUtil.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
maheshkumargangula
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: