@mojaloop/platform-shared-lib-nodejs-kafka-client-lib
Advanced tools
Comparing version 0.3.71 to 0.5.1
@@ -50,11 +50,26 @@ /***** | ||
class MLKafkaRawConsumerOptions { | ||
kafkaBrokerList; | ||
kafkaGroupId; | ||
consumerClientId; | ||
useSyncCommit; | ||
outputType; | ||
autoOffsetReset; // default is latest | ||
messageMaxBytes; | ||
sessionTimeoutMs; //Client group session and failure detection timeout, default is 45 secs | ||
batchSize; | ||
batchTimeoutMs; | ||
} | ||
exports.MLKafkaRawConsumerOptions = MLKafkaRawConsumerOptions; | ||
class MLKafkaRawConsumer extends events_1.EventEmitter { | ||
_logger; | ||
_options; | ||
_globalConfig; | ||
_topicConfig; | ||
_topics; | ||
_client; | ||
_handlerCallback = null; | ||
_batchHandlerCallback = null; | ||
_batchSize = defaultOptions.batchSize; | ||
constructor(options, logger = null) { | ||
super(); | ||
this._handlerCallback = null; | ||
this._batchHandlerCallback = null; | ||
this._batchSize = defaultOptions.batchSize; | ||
this._consuming = false; | ||
this._options = options; | ||
@@ -199,2 +214,3 @@ this._logger = logger; | ||
} | ||
_consuming = false; | ||
_consumeLoop() { | ||
@@ -201,0 +217,0 @@ if (!this._client.isConnected() || this._consuming) |
@@ -54,2 +54,9 @@ /***** | ||
class MLKafkaRawProducerOptions { | ||
kafkaBrokerList; | ||
producerClientId; | ||
skipAcknowledgements; | ||
messageMaxBytes; | ||
compressionCodec; | ||
compressionLevel; | ||
partitioner; | ||
} | ||
@@ -62,2 +69,8 @@ exports.MLKafkaRawProducerOptions = MLKafkaRawProducerOptions; | ||
class MLKafkaRawProducer extends events_1.EventEmitter { | ||
_logger; | ||
_client; | ||
_globalConfig; | ||
_topicConfig; | ||
_options; | ||
_deliveryReportHandlerFn = null; | ||
/* // synthetic sugar for type events | ||
@@ -77,3 +90,2 @@ public on<K extends keyof MLKafkaRawProducerEventListenerMap>(e: K, listener: MLKafkaRawProducerEventListenerMap[K]): this { | ||
super(); | ||
this._deliveryReportHandlerFn = null; | ||
this._options = options; | ||
@@ -80,0 +92,0 @@ this._logger = logger; |
@@ -36,9 +36,20 @@ /***** | ||
class MLKafkaJsonConsumerOptions { | ||
kafkaBrokerList; | ||
kafkaGroupId; | ||
useSyncCommit; | ||
autoOffsetReset; // default is latest | ||
sessionTimeoutMs; //Client group session and failure detection timeout, default is 45 secs | ||
batchSize; | ||
batchTimeoutMs; | ||
} | ||
exports.MLKafkaJsonConsumerOptions = MLKafkaJsonConsumerOptions; | ||
class MLKafkaJsonConsumer extends events_1.EventEmitter { | ||
_logger; | ||
_kafkaRawConsumer; | ||
_handlerCallback = null; | ||
_batchHandlerCallback = null; | ||
_filterFn; | ||
_options; | ||
constructor(options, logger = null) { | ||
super(); | ||
this._handlerCallback = null; | ||
this._batchHandlerCallback = null; | ||
this._options = options; | ||
@@ -45,0 +56,0 @@ this._logger = logger; |
@@ -35,2 +35,4 @@ /***** | ||
class MLKafkaJsonProducer { | ||
_logger; | ||
_rawKafkaProducer; | ||
constructor(options, logger = null) { | ||
@@ -37,0 +39,0 @@ this._logger = logger; |
{ | ||
"name": "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib", | ||
"version": "0.3.71", | ||
"version": "0.5.1", | ||
"description": "mojaloop vnext platform shared libraries", | ||
@@ -40,13 +40,17 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@mojaloop/logging-bc-public-types-lib": "^0.1.22", | ||
"@mojaloop/platform-shared-lib-messaging-types-lib": "~0.2.102", | ||
"@mojaloop/logging-bc-public-types-lib": "~0.5.0", | ||
"@mojaloop/platform-shared-lib-messaging-types-lib": "~0.5.0", | ||
"node-rdkafka": "~2.18.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.53.0", | ||
"eslint": "^8.55.0", | ||
"jest": "^29.7.0", | ||
"npm-check-updates": "^16.14.6", | ||
"npm-check-updates": "^16.14.11", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^4.6.4" | ||
"typescript": "^4.6.4", | ||
"tslib": "^2.6.2" | ||
}, | ||
"engines": { | ||
"node": ">=20.10.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
104216
1365
6
+ Added@mojaloop/logging-bc-public-types-lib@0.5.4(transitive)
+ Added@mojaloop/platform-shared-lib-messaging-types-lib@0.5.7(transitive)
- Removed@mojaloop/logging-bc-public-types-lib@0.1.23(transitive)
- Removed@mojaloop/platform-shared-lib-messaging-types-lib@0.2.103(transitive)
Updated@mojaloop/platform-shared-lib-messaging-types-lib@~0.5.0