-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add streams XREADGROUP and XACK example. #1832
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
Codecov Report
@@ Coverage Diff @@
## master #1832 +/- ##
=======================================
Coverage 95.05% 95.05%
=======================================
Files 353 353
Lines 3314 3314
Branches 407 407
=======================================
Hits 3150 3150
Misses 81 81
Partials 83 83 Continue to review full report at Codecov.
|
@@ -6,7 +6,6 @@ async function streamProducer() { | |||
const client = createClient(); | |||
|
|||
await client.connect(); | |||
await client.del('mystream'); |
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.
?
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.
@leibale I removed the del
because this makes this example work better with the consumer group one... if this deletes the stream it will delete any associated consumer groups too and then if they're running the consumer group example and it runs out of entries to process then they start the producer again it will blow away the stream rather than just continue to add new entries to it.
MKSTREAM: true | ||
}); | ||
console.log('Created consumer group.'); | ||
} catch (e) { |
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.
log the error?
* Removed stream delete command to allow consumer group example to work. * Adds stream consumer group example. * Adds stream consumer group example code. * Update README.md Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
Description
This adds a stream consumer group example that uses
XREADGROUP
andXACK
.Closes #1831
Checklist
npm test
pass with this change (including linting)?