-
Couldn't load subscription status.
- Fork 23
List consumer group offsets #49
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
Merged
Merged
Changes from 116 commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
63f05de
1st commit
PratRanj07 4445321
2nd commit
PratRanj07 28aff0a
3rd commit
PratRanj07 0b3a617
Added tests and examples
PratRanj07 3c4a907
Formatting
PratRanj07 76639a6
Formatting
PratRanj07 6ff253b
little change
PratRanj07 925fd21
some small changes
PratRanj07 5b769a8
Merge branch 'dev_early_access_development_branch' into listConsumerG…
PratRanj07 195a922
changes requested
PratRanj07 380ee83
requested changes
PratRanj07 254765b
requested changes
PratRanj07 3ba54a1
name change
PratRanj07 ffe16f7
indentation
PratRanj07 a98699a
indentation
PratRanj07 160f762
Add data-governance to code owners for schema registry clients (#52)
emasab 2a99288
Fix deprecation warning
milindl 28e28e3
Separate eachMessage and eachBatch internal consume loop
milindl ffbbafd
Update performance example with more cases
milindl 42004b1
Add per-partition cache with global expiry
milindl f949d88
Add per-partition cache expiry logic
milindl 7f24913
Allow cache to disburse multiple messages at once
milindl fbbf9f2
Add per-partition concurrency
milindl 8c11d0e
Add partition level concurrency to faux-eachBatch
milindl 98ba984
Create persistent workers for per-partition concurrency, prevents exc…
milindl 4f0f25b
Fix tests for Per Partition Concurrency
milindl ba0603b
Add message set capability to message cache
milindl fdf56ef
Add naive batching (without resolution handling)
milindl 5ecf261
Add batch staleness, resolution, and offset management to eachBatch
milindl b0e4372
Update tests for true eachBatch
milindl ac0bece
Remove debug-only properties
milindl 72305d2
Update MIGRATION.md for eachBatch
milindl f4b4aaf
Bump version
milindl 31e325c
Fix linting and Makefile issues (#2)
milindl 89e8227
Add SchemaRegistryClient, RestService, and testing (#1)
Claimundefine f34e086
Add mock client for testing
Claimundefine 6c919ff
Remove testing artifacts
Claimundefine 69daca9
Fix flaky e2e tests (#54)
PratRanj07 4f2d255
Preset fix (#6)
Claimundefine 14d33b6
Do not modify RegExps which don't start with a ^
milindl 9fe9571
Fix argument mutation in run, pause and resume
milindl 1dcfe39
Dekregistry client (#67)
Claimundefine b69e87f
Add clientConfig, baseUrl retry, RestError, encodeURIComponent (#12) …
Claimundefine d73a14d
Update tsconfig.json (#69)
rayokota bc059a4
Fix broken tests (#70)
Claimundefine a85cda0
Add commitCb method (#59)
emasab 4b9b340
Fix eslint config (#71)
rayokota 3aab3c2
Add eslint rules (#72)
rayokota 2bbb2af
First cut at JavaScript serdes (#73)
rayokota f724ed8
Add assign/unassign within rebalance callbacks
milindl a348985
Add performance benchmarking script modes and README
milindl 15fff05
Add confluent debian repo for performance benchmark
milindl ffae694
Remove store from promisified API
milindl aceae76
Add binding level debug logging and client name to logs
milindl eddaabc
Fix typo in script name
milindl 8bd4940
First cut at Data Contract rules (#77)
rayokota 3d54a18
Separate SR into a different workspace (#78)
rayokota 34302ba
Refactor to always use a barrier for pending operation (#26)
emasab ad06919
Schemaregistry rebase (#33) (#80)
Claimundefine 9b88c91
Add Docker environment for integration tests (#34) (#81)
Claimundefine 5424a4a
Fix log level config in light of binding logs
milindl 3ca8437
Remove consumerGroupId argument from sendOffsets and add tests (#82)
milindl d2b7227
Performance measurement improvements
emasab 546df33
Admin examples for available APIs (#84)
emasab cd0887a
Fix listGroups segfault when passing an undefined matchConsumerGroupS…
emasab 5c637c0
Add more unit tests; minor fixes for KMS clients (#86)
rayokota cbc69be
Bump version to 0.1.17-devel
milindl ecdd836
Add complex encryption tests (#89)
rayokota 1b77019
Add index.ts (#91)
rayokota ac1367c
Enhance HighLevelProducer to take schema serializers (#92)
rayokota 71c4aeb
Add auth features (#47) (#94)
Claimundefine ffbffe8
Add more JSON Schema validation tests (#95)
rayokota 5adb821
Move ts-jest to dev dependencies (#96)
rayokota b6379d3
Add JSON integration tests (#46) (#97)
Claimundefine 49e12c6
Unsubscribe before disconnecting to mitigate hangs on destroy (#98)
milindl 5356f81
Pass creds to DEK Registry client (#99)
rayokota a8e5b39
Bump version to 0.2.0 and drop -devel (#100)
milindl 8b41c1e
Remove mandatory basic or bearer auth credentials (#57) (#101)
Claimundefine 69b28a5
Add build script and readme (#104)
rayokota a8e3914
Add license (#105)
rayokota acc94a4
Add clearLatestCaches/clearCaches API, fix test to call clearLatestCa…
rayokota 12cf126
Add avro integration tests (#56) (#106)
Claimundefine 12e33c9
Add tsdoc (#107)
rayokota 98f12f8
Enhance docs (#108)
rayokota 9c7f096
Update schemaregistry README (#109)
rayokota 63a949f
Add restService interfaces to exported types (#110)
rayokota ad0ff8c
Rename DekClient to avoid conflict with Client (#112)
rayokota 52944ea
Schemaregistry examples (#69) (#113)
Claimundefine 228f64b
Add schemaregistry examples workspace with avro, json, and csfle exam…
Claimundefine 3431a92
bugfix integ tests for registering -value (#71) (#115)
Claimundefine 5cc2dee
Bump version to v0.2.1 (#116)
milindl 73ca334
Update version to 0.2.1 for EA release (#72) (#117)
Claimundefine 4c7c8df
Add Kafka Oauth implementation (#74) (#119)
Claimundefine fad64ce
Upgrade librdkafka to v2.6.0 (#120)
emasab a86c3b4
Bump version to 0.3.0-RC1 and: (#122)
emasab b3712ba
v0.3.0 (#126)
emasab 1501a64
Minor optimization to reduce schema ID lookups (#123)
rayokota 29bc526
v0.3.0-RC2 (#127)
emasab 4e42726
v0.3.0 final release (#128)
emasab e3de7e4
Fix header conversion in eachBatch (#130)
milindl 0f3a167
1st commit
PratRanj07 1bde73a
2nd commit
PratRanj07 ce5a4e9
3rd commit
PratRanj07 beafa7c
changes requested
PratRanj07 a7c5aca
requested changes
PratRanj07 99b0252
required Changes
PratRanj07 f6f5b54
Merge master
PratRanj07 603ca2e
remove unnecessary changes
PratRanj07 2f86c63
indentation and unnecessary changes
PratRanj07 a758b90
indentation
PratRanj07 7085111
comment removed
PratRanj07 b2e28fa
comment added
PratRanj07 92f262d
changelog entry
PratRanj07 2d90d5b
Changed topic partition js to c conversion structure
PratRanj07 c435397
refactoring
PratRanj07 7f6dd40
Requested changes
PratRanj07 1c1cfe8
final changes
PratRanj07 3c494e4
Merge master
PratRanj07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| const { Kafka } = require('@confluentinc/kafka-javascript').KafkaJS; | ||
| const { parseArgs } = require('node:util'); | ||
|
|
||
| async function fetchOffsets() { | ||
| const args = parseArgs({ | ||
| allowPositionals: true, | ||
| options: { | ||
| 'bootstrap-servers': { | ||
| type: 'string', | ||
| short: 'b', | ||
| default: 'localhost:9092', | ||
| }, | ||
| 'timeout': { | ||
| type: 'string', | ||
| short: 'm', | ||
| default: '5000', | ||
| }, | ||
| 'require-stable-offsets': { | ||
| type: 'boolean', | ||
| short: 'r', | ||
| default: false, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| const { | ||
| 'bootstrap-servers': bootstrapServers, | ||
| timeout, | ||
| 'require-stable-offsets': requireStableOffsets, | ||
| } = args.values; | ||
|
|
||
| const [groupId, ...rest] = args.positionals; | ||
|
|
||
| if (!groupId) { | ||
| console.error('Group ID is required'); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| const kafka = new Kafka({ | ||
| kafkaJS: { | ||
| brokers: [bootstrapServers], | ||
| }, | ||
| }); | ||
|
|
||
| const admin = kafka.admin(); | ||
| await admin.connect(); | ||
|
|
||
| try { | ||
| // Parse topics and partitions from remaining arguments | ||
| const topicInput = parseTopicsAndPartitions(rest); | ||
|
|
||
| // Fetch offsets for the specified consumer group | ||
| const offsets = await admin.fetchOffsets({ | ||
| groupId: groupId, | ||
| topics: topicInput, | ||
| requireStableOffsets, | ||
| timeout: Number(timeout), | ||
| }); | ||
|
|
||
| console.log(`Offsets for Consumer Group "${groupId}":`, JSON.stringify(offsets, null, 2)); | ||
| } catch (err) { | ||
| console.error('Error fetching consumer group offsets:', err); | ||
| } finally { | ||
| await admin.disconnect(); | ||
| } | ||
| } | ||
|
|
||
| // Helper function to parse topics and partitions from arguments | ||
| function parseTopicsAndPartitions(args) { | ||
| if (args.length === 0) return undefined; | ||
|
|
||
| const topicInput = []; | ||
| let i = 0; | ||
|
|
||
| while (i < args.length) { | ||
| const topic = args[i]; | ||
| i++; | ||
|
|
||
| const partitions = []; | ||
| while (i < args.length && !isNaN(args[i])) { | ||
| partitions.push(Number(args[i])); | ||
| i++; | ||
| } | ||
|
|
||
| // Add topic with partitions (or an empty array if no partitions specified) | ||
| if (partitions.length > 0) { | ||
| topicInput.push({ topic, partitions }); | ||
| } else { | ||
| topicInput.push(topic); // Add as a string if no partitions specified | ||
| } | ||
| } | ||
|
|
||
| return topicInput; | ||
| } | ||
|
|
||
| fetchOffsets(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
0.3.1 isn't released yet so remove this section and add "1. Fixes an issue where headers were not passed correctly to the
eachBatchcallback (#130)." within this list only. Call it "Enhancements" instead of features.