-
Notifications
You must be signed in to change notification settings - Fork 259
chore(example): Add Node.js SDK examples #2165
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
- Introduced a comprehensive set of Node.js examples demonstrating basic and advanced usage patterns of the Iggy client SDK. - Added example scripts for producers and consumers in both TypeScript and JavaScript. - Included a README file with instructions on running the examples and setting up the Iggy server. - Created a test script to validate the examples against a running Iggy server. - Added .gitignore and package files to manage dependencies and ignore unnecessary files.
| currentId++; | ||
| const payload = `message-${currentId}`; | ||
| messages.push({ | ||
| payload: Buffer.from(payload, 'utf8') |
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.
payload can also be a string
|
Working on the CR comments, will update shortly |
|
ping @hubcio @T1B0 @Tchoupinax |
|
@iBvishal looks like this PR is out of date, please update |
|
@iBvishal any plans to continue? |
|
@hubcio can you assign me to complete this issue ? i asked this on discord |
|
|
||
| while (sentBatches < BATCHES_LIMIT) { | ||
| const messages = []; | ||
| const sentMessages = []; |
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.
@hubcio sentMessages and messages almost the same, can we just use one for keep it simple ?
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.
@T1B0 what do you think?
| return { connectionString }; | ||
| } | ||
|
|
||
| async function initSystem(client: Client): Promise<void> { |
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 looks overhandled. Try/catch makes this hard to read, If creating a stream/topic fails, then the example has no reason to continue?
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.
makes sense, made the required change.
working on this |
…n consumer and producer examples
|
Closing this because #2394 was merged. |
Github Issue: #1890
Summary of what is done