Skip to content

Conversation

@nitish-egov
Copy link
Collaborator

@nitish-egov nitish-egov commented Aug 6, 2025

Summary by CodeRabbit

  • New Features

    • Added campaign cancellation support with a new API endpoint and updated status handling.
    • Enhanced campaign search with filters for child campaigns and parent relationships.
    • Introduced validation to limit one active child campaign per parent campaign.
  • Improvements

    • Migrated Kafka integration to a modern client with concurrency control and improved error handling.
    • Added asynchronous background processing for campaign creation and user credential generation.
    • Expanded error codes and refined validation for campaigns, files, and date constraints.
    • Improved campaign filtering and search logic, including date overrides from related projects.
    • Added validation to detect and reject extra sheets in uploaded Excel workbooks.
    • Enhanced request metadata handling across various resource generation and polling utilities.
    • Refined campaign persistence and error handling with enriched Kafka messaging including request info.
  • Bug Fixes

    • Corrected error message typos and improved campaign name uniqueness checks.
  • Refactor

    • Removed obsolete utility functions and legacy transformation logic for delivery rules.
    • Simplified campaign delivery rule processing.
  • Chores

    • Updated dependencies by replacing the Kafka client library.
    • Added new Excel ingestion microservice with Spring Boot setup, configuration, and REST API.

ashish-egov and others added 30 commits July 14, 2025 18:08
* added key in producer for parallelism

* added key for producing messages in mapping flow

* Update Producer.ts

---------

Co-authored-by: ashish-egov <[email protected]>
- Add parallel message processing with concurrency limit to reduce lag
- Throw error for extra sheets in uploaded Excel files (strict validation)
- Add DB-level microplan campaign detection utility and use in download logic
- Refactor microplan/standard generation triggers for clarity and correctness
- Ensure Kafka consumer error and offset handlers are always present
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Caution

Review failed

Failed to post review comments.

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d50b262 and 3ee26be.

📒 Files selected for processing (1)
  • health-services/project-factory/src/server/utils/campaignUtils.ts (36 hunks)
🧰 Additional context used
🧠 Learnings (14)
📓 Common learnings
Learnt from: kanishq-egov
PR: egovernments/health-campaign-services#847
File: health-services/libraries/health-services-common/pom.xml:11-11
Timestamp: 2024-08-12T06:07:15.114Z
Learning: Not all services in the health campaign services project are required to move to newer versions like `1.0.17-dev-SNAPSHOT`, as per kanishq-egov's guidance.
Learnt from: shubhang-eGov
PR: egovernments/health-campaign-services#1387
File: health-services/referralmanagement/pom.xml:54-54
Timestamp: 2025-02-11T09:43:42.872Z
Learning: Version updates for health-services-models in referral management service require QA verification to ensure no breaking changes between versions.
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:464-465
Timestamp: 2024-12-04T11:51:07.331Z
Learning: In the `health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts` file, the `throwError` function logs errors internally. Therefore, when catching errors and rethrowing using `throwError`, it's not necessary to add extra `logger.error` calls before invoking `throwError`.
Learnt from: nitish-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/campaignMappingUtils.ts:640-646
Timestamp: 2024-12-04T12:30:22.889Z
Learning: In `health-services/project-factory/src/server/utils/campaignMappingUtils.ts`, the `processMapping` function already includes validation for `mappingObject.CampaignDetails.campaignDetails.boundaries` before accessing it, so additional null checks are unnecessary.
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/LOCALSETUP.md:0-0
Timestamp: 2024-10-08T20:11:07.772Z
Learning: The note in the LOCALSETUP.md file regarding error handling with Kafka and other microservices has been updated to provide more detailed troubleshooting steps.
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/LOCALSETUP.md:0-0
Timestamp: 2024-06-24T08:15:04.390Z
Learning: The note in the LOCALSETUP.md file regarding error handling with Kafka and other microservices has been updated to provide more detailed troubleshooting steps.
Learnt from: holashchand
PR: egovernments/health-campaign-services#1607
File: core-services/beneficiary-idgen/src/test/java/org/egov/id/service/IdGenerationServiceTest.java:20-28
Timestamp: 2025-06-17T10:11:37.370Z
Learning: In the health-campaign-services project, tests are handled at the dev level and comprehensive unit tests are added when needed in the future, rather than requiring full mock coverage for all dependencies immediately.
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java:73-89
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The error message in the `updateCampaignDetails` method of the `CampaignIntegrationUtil` class should be descriptive to aid in debugging, as confirmed by devdatta-egov.
Learnt from: holashchand
PR: egovernments/health-campaign-services#1599
File: health-services/individual/src/main/java/org/egov/individual/service/IndividualService.java:158-166
Timestamp: 2025-06-17T08:53:38.146Z
Learning: The individual service in the health-campaign-services project is using Java 17.
Learnt from: Priyanka-eGov
PR: egovernments/health-campaign-services#1340
File: health-services/plan-service/src/main/java/digit/service/PlanEnricher.java:57-60
Timestamp: 2025-01-29T05:47:58.987Z
Learning: In the health-campaign-services repository's plan-service module, IDs for additional fields in Plan entities are always system-generated and there are no user-provided IDs to preserve.
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java:33-44
Timestamp: 2024-10-08T20:11:07.772Z
Learning: devdatta-egov prefers using generic exception handlers in methods to potentially handle a broader range of exceptions.
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/BoundaryUtil.java:33-44
Timestamp: 2024-06-26T19:56:55.913Z
Learning: devdatta-egov prefers using generic exception handlers in methods to potentially handle a broader range of exceptions.
📚 Learning: 2024-12-04T11:51:07.331Z
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:464-465
Timestamp: 2024-12-04T11:51:07.331Z
Learning: In the `health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts` file, the `throwError` function logs errors internally. Therefore, when catching errors and rethrowing using `throwError`, it's not necessary to add extra `logger.error` calls before invoking `throwError`.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-12-04T12:30:22.889Z
Learnt from: nitish-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/campaignMappingUtils.ts:640-646
Timestamp: 2024-12-04T12:30:22.889Z
Learning: In `health-services/project-factory/src/server/utils/campaignMappingUtils.ts`, the `processMapping` function already includes validation for `mappingObject.CampaignDetails.campaignDetails.boundaries` before accessing it, so additional null checks are unnecessary.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-10-08T20:11:12.539Z
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/util/CampaignIntegrationUtil.java:73-89
Timestamp: 2024-10-08T20:11:12.539Z
Learning: The error message in the `updateCampaignDetails` method of the `CampaignIntegrationUtil` class should be descriptive to aid in debugging, as confirmed by devdatta-egov.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-10-08T20:11:07.772Z
Learnt from: Saloni-eGov
PR: egovernments/health-campaign-services#906
File: health-services/plan-service/src/main/java/digit/util/CampaignUtil.java:34-46
Timestamp: 2024-10-08T20:11:07.772Z
Learning: When exceptions occur in `CampaignUtil.fetchCampaignData`, it's acceptable to catch all exceptions, log the error, and return the `campaignResponse`.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-12-04T11:51:01.303Z
Learnt from: jagankumar-egov
PR: egovernments/health-campaign-services#1082
File: health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts:498-499
Timestamp: 2024-12-04T11:51:01.303Z
Learning: In the `health-services/project-factory` codebase, the `throwError()` function already logs errors internally. Therefore, explicit error logging before calling `throwError()` is unnecessary.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2025-05-07T08:53:03.650Z
Learnt from: tanishi-egov
PR: egovernments/health-campaign-services#1533
File: health-services/plan-service/src/main/java/digit/repository/querybuilder/PlanEmployeeAssignmentQueryBuilder.java:155-158
Timestamp: 2025-05-07T08:53:03.650Z
Learning: In the health-campaign-services project, plan.max.limit is configured in application.properties, so null checks for config.getMaxLimit() are not necessary when using this value in pagination logic.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2025-05-29T06:53:25.851Z
Learnt from: Sreejit-K
PR: egovernments/health-campaign-services#1577
File: core-services/beneficiary-idgen/src/main/resources/application.properties:76-83
Timestamp: 2025-05-29T06:53:25.851Z
Learning: In the health-campaign-services project, configuration properties should follow existing patterns throughout the codebase rather than using environment variable placeholders, to maintain consistency across the project.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-09-27T05:03:24.501Z
Learnt from: Taniya-eGov
PR: egovernments/health-campaign-services#914
File: health-services/plan-service/src/main/java/digit/web/models/projectFactory/CampaignDetail.java:21-85
Timestamp: 2024-09-27T05:03:24.501Z
Learning: For the `CampaignDetail` class, the use of `Object additionalDetails` is intentional to provide flexibility for external service integration.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-09-27T05:11:37.733Z
Learnt from: Saloni-eGov
PR: egovernments/health-campaign-services#906
File: health-services/plan-service/src/main/java/digit/util/CampaignUtil.java:48-60
Timestamp: 2024-09-27T05:11:37.733Z
Learning: In this project, it's acceptable to keep the creation of objects like `CampaignSearchCriteria` within the current method for simplicity, even if extracting into a separate private method could improve readability.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2025-05-05T11:46:06.216Z
Learnt from: tanishi-egov
PR: egovernments/health-campaign-services#1533
File: health-services/plan-service/src/main/java/digit/service/enrichment/PlanFacilityEnricher.java:69-86
Timestamp: 2025-05-05T11:46:06.216Z
Learning: In the health-campaign-services codebase, boundary codes are validated against the boundary service before being used in enrichment methods like PlanFacilityEnricher.enrichJurisdictionMapping, guaranteeing that boundary search responses will always contain valid data and making null checks unnecessary.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-10-08T20:11:07.773Z
Learnt from: kanishq-egov
PR: egovernments/health-campaign-services#847
File: health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/TaskStatus.java:6-12
Timestamp: 2024-10-08T20:11:07.773Z
Learning: The `TaskStatus` enum values are used for SMC, Bednet, and IRS campaigns in the health campaign services project.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2024-06-26T17:13:14.997Z
Learnt from: devdatta-egov
PR: egovernments/health-campaign-services#784
File: health-services/resource-estimation-service/src/main/java/org/egov/processor/web/models/boundary/BoundarySearchResponse.java:28-43
Timestamp: 2024-06-26T17:13:14.997Z
Learning: The `addTenantBoundaryItem` method in `BoundarySearchResponse.java` does not require thread safety measures as per devdatta-egov's guidance.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
📚 Learning: 2025-01-30T06:12:02.730Z
Learnt from: Priyanka-eGov
PR: egovernments/health-campaign-services#1340
File: health-services/resource-generator/src/main/java/org/egov/processor/util/CalculationUtil.java:82-82
Timestamp: 2025-01-30T06:12:02.730Z
Learning: The getBoundaryCodeValue() method in PlanUtil requires a non-empty mappedValues map containing valid property mappings to prevent runtime exceptions.

Applied to files:

  • health-services/project-factory/src/server/utils/campaignUtils.ts
🪛 Gitleaks (8.27.2)
health-services/project-factory/src/server/utils/campaignUtils.ts

2640-2640: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 Biome (2.1.2)
health-services/project-factory/src/server/utils/campaignUtils.ts

[error] 2635-2635: Unsafe usage of optional chaining.

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

(lint/correctness/noUnsafeOptionalChaining)


[error] 2718-2718: Unsafe usage of optional chaining.

If it short-circuits with 'undefined' the evaluation will throw TypeError here:

(lint/correctness/noUnsafeOptionalChaining)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (9)
health-services/project-factory/src/server/utils/campaignUtils.ts (9)

1014-1018: Good split of error code and message fields

Storing both error (code) and errorMessage is a solid improvement for downstream consumers.


1023-1026: Including RequestInfo in Kafka messages is correct

Propagating RequestInfo with persistence events improves traceability and auditability.

Also applies to: 1080-1083, 1140-1141, 1263-1264, 1288-1289


1713-1723: Verify project referenceID vs campaignNumber mapping

You key projectsMap by project.referenceID but later look up by data.campaignNumber. Ensure referenceID === campaignNumber in all cases; otherwise consider keying by projectId or store both keys.

Add guard logging when a lookup misses to aid debugging.

Also applies to: 1678-1694


1275-1296: Parent/child activation toggles look correct

  • Child campaigns set isActive = true.
  • Parent campaign deactivation handled via makeParentInactiveOrActive when child is in progress.

Also applies to: 1185-1187, 1105-1106


2986-3016: App config creation/clone flows are robust

Good use of MDMS v2, chunked localisation upserts, and audit user UUID enforcement.

Also applies to: 3025-3079


1734-1766: Campaign name like-search is implemented correctly

ILIKE with bind variables is safe; good handling of like vs exact matches.


2550-2576: Async flow orchestration is solid

Non-blocking background processing with setImmediate and error persistence is a good pattern.


3602-3603: I wasn’t able to locate the definition of transformAndCreateLocalisation in the snippet provided—so it’s unclear whether it returns a Promise or performs I/O that must complete before createAndUploadJsonFile. To be safe, either:

  • Await its result if downstream logic depends on the generated localisation files; or
  • Add a comment marking it as “fire-and-forget” if it intentionally runs in parallel.

Next steps:

• Search for async function transformAndCreateLocalisation (or its import) to confirm if it returns a Promise.
• If it’s synchronous or side-effect-free, add a clarifying comment.
• Otherwise, prepend await to ensure ordering.


4392-4396: Ignore incorrect suggestion: defaultRequestInfo.RequestInfo is the correct payload
The defaultRequestInfo constant imported from coreApis.ts is a wrapper object whose actual RPC payload lives under its RequestInfo property. Throughout the codebase we consistently use defaultRequestInfo.RequestInfo to construct the request body. Replacing it with defaultRequestInfo would nest RequestInfo one level too deep and break the downstream contract. No change required here.

Likely an incorrect or invalid review comment.

Walkthrough

This update introduces significant changes across the health-services/project-factory module. Major updates include migrating Kafka integration from kafka-node to kafkajs, reworking campaign creation, update, and cancellation flows, enhancing validation logic (notably for child campaigns and campaign dates), and improving error handling and background processing. Several utility and validation functions were removed or refactored, new error codes and schema fields were added, and database schema for campaign data was altered. The codebase now supports more robust campaign management, stricter validation, and improved concurrency and error reporting.

Changes

Cohort / File(s) Change Summary
Kafka Migration
src/server/kafka/Listener.ts, src/server/kafka/Producer.ts, package.json
Migrated Kafka integration from kafka-node to kafkajs, refactored consumer and producer logic, added concurrency control, error handling, support for keyed messages, and updated dependencies.
Campaign Workflow Enhancements
src/server/utils/campaignUtils.ts, src/server/service/campaignManageService.ts, src/server/controllers/campaignManage/campaignManage.controller.ts, src/server/validators/campaignValidators.ts, src/server/config/constants.ts, src/server/config/models/searchCampaignDetails.ts, src/server/config/index.ts
Enhanced campaign creation, update, and cancellation flows; added new validation for child campaigns, campaign dates, error codes, schema fields, and enforced environment variable for base secret.
Database Schema Migration
migration/main/V20250731123400__alter__campaign_data_table.sql
Altered primary key of eg_cm_campaign_data table to include type column.
Background Processing and Error Handling
src/server/utils/campaignUtils.ts, src/server/utils/taskUtils.ts
Offloaded campaign resource creation and mapping to background tasks, improved error logging and persistence, updated error messages.
Validation and Utility Function Removals
src/server/utils/genericUtils.ts, src/server/validators/genericValidator.ts, src/server/utils/transforms/projectTypeUtils.ts, src/server/api/genericApis.ts, src/server/api/campaignApis.ts, src/server/utils/excelUtils.ts
Removed various unused or legacy utility and validation functions, simplified transformation logic, and cleaned up commented code.
User Data Decryption Refactor
src/server/generateFlowClasses/user-generateClass.ts, src/server/generateFlowClasses/userCredential-generateClass.ts, src/server/processFlowClasses/user-processClass.ts
Refactored user data decryption to use async mapping with logging for progress tracking.
Campaign Data Download and Generation
src/server/service/dataManageService.ts, src/server/utils/generateUtils.ts
Added forceUpdate parameter to microplan campaign data generation and download logic.
Campaign Resource and Template Handling
src/server/utils/mailUtils.ts, src/server/utils/microplanIntergration.ts, src/server/utils/pollUtils.ts
Updated internal calls to pass request body for template/resource downloads, updated function signatures accordingly.
Sheet and Boundary Validation
src/server/utils/sheetManageUtils.ts, src/server/utils/onGoingCampaignUpdateUtils.ts
Added validation for extra sheets in uploads and improved boundary validation for child campaigns; refactored project fetching utility.
Cryptographic Configuration
src/server/utils/cryptUtils.ts
Updated base secret retrieval to use configuration, ensuring consistent key management.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Controller
    participant Service
    participant Utils
    participant Kafka
    participant DB

    Client->>Controller: POST /v1/project-type/cancel-campaign
    Controller->>Service: cancelCampaignService(request)
    Service->>Utils: validateAndFetchCampaign(request)
    Utils->>DB: Query campaign by campaignId
    DB-->>Utils: Campaign data
    Utils-->>Service: Validated campaign
    Service->>Utils: prepareAndProduceCancelMessage(campaign, RequestInfo, request)
    Utils->>Kafka: Produce cancel message (status: cancelled)
    Kafka-->>Utils: Ack
    Utils-->>Service: Result
    Service-->>Controller: Cancel result
    Controller-->>Client: Response
Loading
sequenceDiagram
    participant Kafka
    participant Listener
    participant Handler
    participant Semaphore

    Kafka->>Listener: Message received
    Listener->>Semaphore: Check concurrency
    alt Concurrency < limit
        Listener->>Handler: processMessageKJS(message)
        Handler-->>Listener: Done
        Listener->>Semaphore: Release slot
    else Concurrency >= limit
        Listener->>Listener: Wait, log warning
    end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~90 minutes

Poem

🐇✨
In the warren of code, a Kafka hops anew,
With keys and semaphores, and messages in queue.
Campaigns now cancel, child checks are tight,
Errors report clearly, and secrets hide right.
Old utilities burrowed, new flows take the lead—
A garden of features for every bunny’s need!
🌱💻

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch allValidations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

ashish-egov and others added 3 commits August 8, 2025 10:04
* Change logs

* Gap fix

* Version Incremented

* Removed old process track logics

* Refactor

* Refactor

* Migrate.sh fix

* Some fixes

* Fix sheetname

* Some Refactors

* Removal or changedates and retry via controller (code cleanup)

* App module mdms call made parallel and optimised

* User phone number length from env

* Removed unused idgen call

* Refactored

* Removed date validation in draft

* Microplan v1 pai flow revived

* Removed user microplan sheet from autogenerate

* Kafka key (#1694)

* added key in producer for parallelism

* added key for producing messages in mapping flow

* Update Producer.ts

---------

Co-authored-by: ashish-egov <[email protected]>

* feat: Improve Kafka consumer concurrency and robustness

- Add parallel message processing with concurrency limit to reduce lag
- Throw error for extra sheets in uploaded Excel files (strict validation)
- Add DB-level microplan campaign detection utility and use in download logic
- Refactor microplan/standard generation triggers for clarity and correctness
- Ensure Kafka consumer error and offset handlers are always present

* ForceUpdate True

* Forec update true

* Some fixes

* Error message fix

* Error fix

* Error fix

* udpated logic of campaign dates once the date is change at any boundary level

* made changes for like  search and update dates of campaign based onrequest flags

* Kafka change to kafkajs

* Producer Retry

* Kafka logs

* Dates messages added

* Some fixes

* Some loggers

* error loggers

* removed kafka node

---------

Co-authored-by: Jagankumar E <[email protected]>
Co-authored-by: nitish-egov <[email protected]>
@jagankumar-egov jagankumar-egov merged commit 1a36b3e into master Aug 8, 2025
5 of 7 checks passed
@jagankumar-egov jagankumar-egov deleted the allValidations branch August 8, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants