kafka-ts 1.1.2-beta.1 → 1.1.2-beta.3

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.
@@ -73,6 +73,7 @@ class Connection {
73
73
  this.socket.once('error', reject);
74
74
  });
75
75
  this.socket.removeAllListeners('error');
76
+ this.socket.on('error', error => logger_1.log.debug('Socket error', { error }));
76
77
  this.socket.on('data', (data) => this.handleData(data));
77
78
  this.socket.once('close', async () => {
78
79
  Object.values(this.queue).forEach(({ reject }) => {
@@ -99,7 +99,7 @@ class Producer {
99
99
  await this.cluster.sendRequestToNode(parseInt(nodeId))(api_1.API.PRODUCE, {
100
100
  transactionalId: null,
101
101
  acks,
102
- timeoutMs: 5000,
102
+ timeoutMs: 30000,
103
103
  topicData,
104
104
  });
105
105
  topicData.forEach(({ name, partitionData }) => {
@@ -26,8 +26,8 @@ class Lock extends events_1.default {
26
26
  await new Promise((resolve) => {
27
27
  const timeout = setTimeout(() => {
28
28
  logger_1.log.warn(`Lock timed out`, { key });
29
- this.emit(`release:${key}`);
30
- }, 10_000);
29
+ this.releaseKey(key);
30
+ }, 60_000);
31
31
  this.once(`release:${key}`, () => {
32
32
  clearTimeout(timeout);
33
33
  resolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kafka-ts",
3
- "version": "1.1.2-beta.1",
3
+ "version": "1.1.2-beta.3",
4
4
  "main": "dist/index.js",
5
5
  "author": "Priit Käärd",
6
6
  "license": "MIT",