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

feat: sns to lambda stage #252

Merged
merged 5 commits into from Feb 10, 2023

Conversation

malachi-constant
Copy link
Contributor

Relates

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@malachi-constant
Copy link
Contributor Author

Integration test passing.

Screen Shot 2023-02-08 at 11 43 36 AM

Copy link
Collaborator

@anmolsgandhi anmolsgandhi left a comment

Choose a reason for hiding this comment

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

Continuing the conversation on redrive, i believe users can have multiple ways to redrive, most common i have seen is having a lambda to reprocess, that is also a pattern we have in SDLF. So essentially DLQ --> Lambda --> SNS event/Lambda logic --> SNS

@LeonLuttenberger
Copy link
Contributor

Continuing the conversation on redrive, i believe users can have multiple ways to redrive, most common i have seen is having a lambda to reprocess, that is also a pattern we have in SDLF. So essentially DLQ --> Lambda --> SNS event/Lambda logic --> SNS

A Lambda could solve this, yes. The reason I think an SQS queue is still preferable is that it comes with built-in redrive functionality. As this is a relatively recent addition (December 2021), the Lambda pattern in SDLF was designed prior to this.

Another advantage to this is that a Lambda can only redrive 10 messages at a time per each call to SQS. This redrive feature in SQS allows you to redrive thousands of messages in a matter of seconds by just pressing the "redrive" button.

@anmolsgandhi
Copy link
Collaborator

Continuing the conversation on redrive, i believe users can have multiple ways to redrive, most common i have seen is having a lambda to reprocess, that is also a pattern we have in SDLF. So essentially DLQ --> Lambda --> SNS event/Lambda logic --> SNS

A Lambda could solve this, yes. The reason I think an SQS queue is still preferable is that it comes with built-in redrive functionality. As this is a relatively recent addition (December 2021), the Lambda pattern in SDLF was designed prior to this.

Another advantage to this is that a Lambda can only redrive 10 messages at a time per each call to SQS. This redrive feature in SQS allows you to redrive thousands of messages in a matter of seconds by just pressing the "redrive" button.

Yes that does make sense, if we move towards a SNS->SQS->LAMBDA stage then we completely dont provide for the SNS->LAMBDA usecase. thoughts ??

@malachi-constant
Copy link
Contributor Author

Continuing the conversation on redrive, i believe users can have multiple ways to redrive, most common i have seen is having a lambda to reprocess, that is also a pattern we have in SDLF. So essentially DLQ --> Lambda --> SNS event/Lambda logic --> SNS

A Lambda could solve this, yes. The reason I think an SQS queue is still preferable is that it comes with built-in redrive functionality. As this is a relatively recent addition (December 2021), the Lambda pattern in SDLF was designed prior to this.
Another advantage to this is that a Lambda can only redrive 10 messages at a time per each call to SQS. This redrive feature in SQS allows you to redrive thousands of messages in a matter of seconds by just pressing the "redrive" button.

Yes that does make sense, if we move towards a SNS->SQS->LAMBDA stage then we completely dont provide for the SNS->LAMBDA usecase. thoughts ??

My vote would be to add SNS as an optional feature to our existing sqs to lambda stage or just inherit from the existing stage with the additional functionality and event target.

@kukushking
Copy link
Contributor

if we move towards a SNS->SQS->LAMBDA stage then we completely dont provide for the SNS->LAMBDA usecase.

My 2 cents: using SNS + SQS together is a very common scalable pattern and it is able to cover same requirements as direct SNS -> lambda and SQS + lambda. You can scale consumers and producers independently and add more queues if running into lambda concurrency limits.

The reason I think an SQS queue is still preferable is that it comes with built-in redrive functionality. As this is a relatively recent addition (December 2021), the Lambda pattern in SDLF was designed prior to this.

Another advantage to this is that a Lambda can only redrive 10 messages at a time per each call to SQS. This redrive feature in SQS allows you to redrive thousands of messages in a matter of seconds by just pressing the "redrive" button.

Neat, didn't know about this addition. It was always a pain to only be able to redrive by 10 messages at a time.

@malachi-constant malachi-constant merged commit 709df57 into typescript-conversion Feb 10, 2023
@malachi-constant malachi-constant deleted the ts/250-sns-lambda-stage branch February 10, 2023 20:34
@malachi-constant malachi-constant moved this from In Review to Done in Roadmap Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants