-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feature: Add support for immediate
flag when using Kinesis analytics providers
#10783
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
Conversation
if (params.event?.immediate) { | ||
this._sendEvents([params]); | ||
|
||
return Promise.resolve(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the behavior of this._putToBuffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. Is there any documentation update required?
Yep there was a 1 line change required, working on it now. |
Codecov Report
@@ Coverage Diff @@
## main #10783 +/- ##
==========================================
+ Coverage 85.65% 86.15% +0.50%
==========================================
Files 196 197 +1
Lines 18261 18379 +118
Branches 3892 3911 +19
==========================================
+ Hits 15642 15835 +193
+ Misses 2543 2470 -73
+ Partials 76 74 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Thanks @jimblanc 🔥
Description of changes
This change adds support for the
immediate
flag when usingAWSKinesisProvider
orAWSKinesisFirehouseProvider
to align with our published API contract. Setting theimmediate
flag on a record will trigger the providers to immediately send the record to the appropriate Kinesis client without trying to buffer it. The motivations for this change were to align the API with Pinpoint client & help a customer who was having trouble emitted Kinesis events from a RN application while in the background (due to RN pausing timers, such as the one used to flush the event buffer).Issue #, if available
SIM Issue
Description of how you validated changes
Local testing, clean integration test run. Verified that
immediate
records were persisted in the Kinesis data stream in a React Native application from both the foreground and background (see attached image).Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.