@aitickets123654/common-kafka 1.0.9 → 1.0.11

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.
@@ -10,6 +10,5 @@ export declare abstract class Listener<T extends Event> {
10
10
  protected consumer: Consumer;
11
11
  constructor(consumer: Consumer);
12
12
  listen(): Promise<void>;
13
- disconnect(): Promise<void>;
14
13
  }
15
14
  export {};
@@ -37,11 +37,5 @@ class Listener {
37
37
  },
38
38
  });
39
39
  }
40
- async disconnect() {
41
- if (this.consumer) {
42
- await this.consumer.disconnect();
43
- console.log(`Listener disconnected (topic: ${this.topic})`);
44
- }
45
- }
46
40
  }
47
41
  exports.Listener = Listener;
@@ -40,7 +40,7 @@ class Publisher {
40
40
  topic: this.topic,
41
41
  messages: [{ value: JSON.stringify(data) }],
42
42
  });
43
- console.log(`Event published to topic '${this.topic}'`, data);
43
+ console.log(`Event published to topic '${this.topic}'`, `\ndata: ${JSON.stringify(data, null, 2)}`);
44
44
  }
45
45
  catch (err) {
46
46
  console.error('Failed to publish event:', err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aitickets123654/common-kafka",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",