Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a source service to stream onemac data to kafka #1292

Merged
merged 6 commits into from
Jul 31, 2023
Merged

Add a source service to stream onemac data to kafka #1292

merged 6 commits into from
Jul 31, 2023

Conversation

mdial89f
Copy link
Collaborator

@mdial89f mdial89f commented Jun 23, 2023

Story: https://qmacbis.atlassian.net/browse/OY2-24530
Endpoint: https://d26w3prdxhme46.cloudfront.net/

Details

This changeset adds a new service named 'source'. It is comprised of a lambda set to listen to onemac's onetable stream, and send changes to a kafka topic.

Changes

  • source service added
  • sourceDynamoToMsk function was created to filter out seatool data and stream what's left to a kafka topic.
  • the kafka topic is named aws.onemac.migration.cdc
  • the source service will only deploy for develop, master, and production branches. It supports deploying on ephemerals, but I figured it's unneeded.

Implementation Notes

  • A one time migration of existing data not represented in the stream needs to occur upon promotion. On that note, @mdial89f should be notified before merge, to handle this step.

Test Plan

The events are currently streaming as expected. No further plan developed.

@github-actions
Copy link

Endpoint URL - https://d26w3prdxhme46.cloudfront.net

Copy link

@benjaminpaige benjaminpaige left a comment

Choose a reason for hiding this comment

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

Wonderful addition

@mdial89f
Copy link
Collaborator Author

@Dark-Knight-1313 @kristin-at-theta
If one of you have the time, could you review ^^^. Here or on slack is good for questions. Thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to add an actual timeout value for the deleteTopics or are we good with the default API timeout?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's set to 300s for the lambda and 295s for the kafkajs call. Are you seeing differently? @Dark-Knight-1313

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just note: We are taking the second table stream and Dynamo only allows two stream subscriptions so if we ever need anything else to use table streams we will have to reconstruct using a fan out pattern.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a great point, and will keep this in mind. If you're comfortable moving ahead, I am.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unit tests? Cypress automated tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No automated tests were written as part of this changeset.

@mdial89f mdial89f merged commit 4440422 into develop Jul 31, 2023
92 of 93 checks passed
@mdial89f mdial89f deleted the pump branch July 31, 2023 16:22
mdial89f added a commit that referenced this pull request Sep 12, 2023
* Add a source service to stream data out of dynamo

* set the deploy to be conditional and honor the correct envs
mdial89f added a commit that referenced this pull request Sep 12, 2023
* Add a source service to stream onemac data to kafka (#1292)

* Add a source service to stream data out of dynamo

* set the deploy to be conditional and honor the correct envs

* Add a cross account role to fetch S3 uploads (#1319)

* feat(cross-acct service):  Create a cross acct role for uploads

* correct names

* deps

* Add getobjecttagging perms so we can honor the clean tags
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