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

How to handle backpressure whe using a KCL-KPL application written using cloud-stream-kinesis-binder #230

Open
siddharthjain210 opened this issue Dec 7, 2024 · 2 comments
Milestone

Comments

@siddharthjain210
Copy link

siddharthjain210 commented Dec 7, 2024

In what version(s) of Spring Cloud Stream Binder for AWS Kinesis are you seeing this issue?
3.0.0

Describe the bug
I have an application written using spring-cloud-stream, that connects 2 different kinesis streams by relaying the records from source stream to the destination streams. The streams can be in different aws accounts too. The setup is to define a kinesis bridge between 2 different systems / accounts.

the application uses a KCL consumer to read records from a stream in source account and publishes messages to a stream in the destination aws account using KPL.

In heavy load, we are losing records when publishing to KPL, the errors and exceptions are swallowed internally. The KCL is working perfectly fine.

How do we configure backpressure when using spring-cloud-stream-kinesis-binder as referred to the below links

https://aws.amazon.com/blogs/big-data/implementing-efficient-and-reliable-producers-with-the-amazon-kinesis-producer-library/
https://github.com/awslabs/amazon-kinesis-producer?tab=readme-ov-file#back-pressure

To Reproduce
Setup a KCL-KPL enables application, produce a very heavy load

Expected behavior
under extreme load, there shouldnt be any record loss when using KPL. There should be capability to handle backpressue, even if PutRecords Aggregation is enabled.

@siddharthjain210
Copy link
Author

Digging further deeper, this requires a change in the KPLMessageHandler.handleUserRecord method in spring-integration-aws library.

@artembilan
Copy link
Member

I think this one would be a natural evolution after spring-projects/spring-integration-aws#249.
So, we would expose respective back-pressure configuration properties and handle them in the binder for KPL binding configuration.
Thanks

@artembilan artembilan added this to the 4.0.5 milestone Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants