Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Conversation

@rishuyadavbv
Copy link
Contributor

Pull Request: Integrate changes for emodb stabilization, kafka integration and stepfunction firing

Description:

As part of the Emo Stabilization Phase 1, this PR integrates the Kafka Producer and AdminClient into the Queue Module to ensure robust messaging and topic management. The goal is sending messages to Kafka, handle automatic Kafka topic creation, firing the stepfunction execution, and store the incoming throttled messages from kafka to cassandra


Key Changes:

  1. Kafka Producer & AdminClient Integration:

    • Implemented the Kafka Producer and AdminClient to support messaging operations in the Queue Module.
    • Messages are now sent to Kafka using the sendAll function, which handles the topic creation and stepfn firing as well
  2. Automatic Topic Creation:

    • Added logic to automatically create Kafka topics if they don't already exist.
    • Fixed the topic creation mechanism by checking for topic existence before sending messages, ensuring smooth operation.
  3. Step Function Execution:

    • Introduced functionality to trigger a Step Function execution when a new Kafka topic is created for the first time.
    • Step Function executions are triggered with a well-defined name and appropriate input payload.
  4. AWS Parameter Store Integration:

    • Integrated AWS Parameter Store to securely fetch configurations for both Kafka and Step Function services.
    • This improves the maintainability and security of managing sensitive configurations.
  5. New Endpoint for Cassandra Queue Service:

    • Created a new API endpoint sendBatch1 to allow direct sending of messages to the Cassandra Queue Service.
    • This endpoint will be called by the Throttler Service in a rate-limited manner

Additional Notes:

  • Refactored the Queue Module for better separation of concerns, ensuring that Kafka and Cassandra interactions are modular and maintainable.
  • Tested the topic creation, message sending, and Step Function executions in a dev environment.

Checklist:

  • Kafka Producer and AdminClient integrated
  • Automatic Kafka topic creation implemented and verified
  • Step Function execution for new topics tested
  • AWS Parameter Store integrated for config management
  • Code refactored for better separation of concerns
  • New endpoint sendBatch1 for Cassandra created and tested

rishuyadavbv and others added 30 commits October 22, 2024 21:37
* PD-249429: integrated emodb with datastorage-media-service for getting the metadata from s3.

* PD-249429: refactored code.

* PD-249428: DELETE blob with blob id.

* PD-249428: Implemented upload blob from byte array.

* PD-249428: Implemented upload blob from byte array.

* PD-249428: Fixed failing ITs.

* PD-249428: Fixed failing ITs.

* PD-249428: Changed the snapshot version.

* PD-249428: Refactored code.

* PD-249428: changed the version to 172.

* PD-249428: commented tests.

* branch admin -prepare release emodb-6.5.172

* PD-249428: changed snapshot versions.

* PD-249428: changed snapshot versions.

* branch admin -prepare release emodb-6.5.173

* branch admin -prepare for next development iteration

* changed the BASE_URL

* PD-256742: fixed all bugs.

* PD-256742: changed snapshot version.

* PD-256742: changed snapshot version.

* branch admin -prepare release emodb-6.5.176

* branch admin -prepare for next development iteration

* for testing

* feat: integrate kafka to emodb

* Create kafka producer and admin service

* Overload the sendAll method to reroute messages to kafka

* Make the required changes in Clients like jersey2

* feat: include logic for separation  of queue and dedupq

* feat: include guava dependency injection for emodb

* fix: seperation of producer and admin service and proper injection

* fix: fix DI wiring issue

* feat: integrate triggering step function execution on creation of new topic

* feat: merge changes for stepfunction

* branch admin -prepare release emodb-6.5.175

* branch admin -prepare for next development iteration

* feat: add parameter store

* fix:add aws core dependency

* fix:remove credentialProvider

* fix: changes for ci deployment

* fix: pom changes for blob

* chore: update tags to 177 for deployment

* branch admin -prepare release emodb-6.5.177

* branch admin -prepare for next development iteration

* chore: update msk servers

* fix: include msk server url

* chore: snapshot update to 181

* branch admin -prepare release emodb-6.5.181

* branch admin -prepare for next development iteration

* feat: include working parameter store and stepfn changes

* add proper exception handling in parameter store and stepfn

* make abstractqueue service code modular and organized

* branch admin -prepare release emodb-6.5.182

* branch admin -prepare for next development iteration

* feat: fetch kafka configs from ssm and dependency injection for stepfn

* fetch aws configs from ssm parameter store

* introduce dependency injection for stepfunction service

* branch admin -prepare release emodb-6.5.183

* branch admin -prepare for next development iteration

* feat: feature flag implementation for queue migrations

* include the proper naming for each stepfn execution

* include all required contracts for stepfn

* include the feature flag logic, fetch params from parameter store and based on the allowed queues migrate

* fix: fix param for allowedQueues

* branch admin -prepare release emodb-6.5.184

* branch admin -prepare for next development iteration

* fix: remove blob changes

* chore: add comments and fix  start.sh

* fix: changed logic for feature flag
* add changed logic for feature flag implementation

* wrap the payload for stepfn around a executionInput parameter

* fix: fixed exception handling and code refactoring

* throw back exceptions after logging

* include create topic and checktopic in one function

* add comments for better description

---------

Co-authored-by: vikram-vikram_bveng <[email protected]>
Co-authored-by: jenkins <[email protected]>
Co-authored-by: nabajyotiDash-hub <[email protected]>
* feat: add universe fetching and bug fixes

* fix: remove debug logs
* fix: fix send logic and exception handling changes

* added exception handling

* changed producer send logic to be synchronous

* removed redundant logs

* uncached_size for dedupq (#837)

* chore: rename queuetype as per convention

* chore: fix naming issue

---------

Co-authored-by: nabajyotiDash-hub <[email protected]>
@bharadwaj-k bharadwaj-k merged commit 032af2b into main Oct 28, 2024
2 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants