@platformatic/kafka 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -448,13 +448,17 @@ export class Consumer extends Base {
448
448
  });
449
449
  }
450
450
  #listOffsets(withTimestamps, options, callback) {
451
- this[kMetadata]({ topics: options.topics }, (error, metadata) => {
451
+ let topics = options.topics;
452
+ if (!topics || topics.length === 0) {
453
+ topics = this.topics.current;
454
+ }
455
+ this[kMetadata]({ topics }, (error, metadata) => {
452
456
  if (error) {
453
457
  callback(error, undefined);
454
458
  return;
455
459
  }
456
460
  const requests = new Map();
457
- for (const name of options.topics) {
461
+ for (const name of topics) {
458
462
  const topic = metadata.topics.get(name);
459
463
  const toInclude = new Set(options.partitions?.[name] ?? []);
460
464
  const hasPartitionsFilter = toInclude.size > 0;
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const name = "@platformatic/kafka";
2
- export const version = "1.18.0";
2
+ export const version = "1.19.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/kafka",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "Modern and performant client for Apache Kafka",
5
5
  "homepage": "https://github.com/platformatic/kafka",
6
6
  "author": "Platformatic Inc. <oss@platformatic.dev> (https://platformatic.dev)",