Skip to content

fix(docs): make Node SDK quickstart and examples runnable (closes #51) - #52

Merged
spetz merged 1 commit into
apache:mainfrom
justinmclean:fix-node-sdk-quickstart
Aug 5, 2026
Merged

fix(docs): make Node SDK quickstart and examples runnable (closes #51)#52
spetz merged 1 commit into
apache:mainfrom
justinmclean:fix-node-sdk-quickstart

Conversation

@justinmclean

Copy link
Copy Markdown
Member

The Node quickstart sent to a stream and topic it never created, so it failed
immediately on a fresh server.

Both pages now:

  • look up the stream and topic by name and create only what is missing, so runs
    are repeatable
  • use Partitioning.Balanced instead of indexing topic.partitions, which is
    absent from the object topic.list returns even though topic.create
    includes it
  • address the stream and topic by name in the consumer rather than assuming ids 1 and 1
  • poll with PollingStrategy.Next and autocommit: true, so consecutive runs
    read successive batches instead of repeating the first ten
  • fix partitionId from 1 to 0
  • call client.destroy()

Verified against apache/iggy:edge: producer twice, consumer twice, second run
picking up the next batch.

AI was used to help draft this. Reviewed and tested by a real human.

@spetz
spetz merged commit f78fd6e into apache:main Aug 5, 2026
@justinmclean
justinmclean deleted the fix-node-sdk-quickstart branch August 5, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants