🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@confluentinc/kafka-javascript

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@confluentinc/kafka-javascript - npm Package Compare versions

Comparing version

to
1.3.1-rc1

20

CHANGELOG.md

@@ -0,1 +1,14 @@

# confluent-kafka-javascript v1.3.1
v1.3.1 is a maintenance release. It is supported for all usage.
## Fixes
1. Avoid a race condition that causes 100% usage of a CPU core when
consuming with `partitionsConsumedConcurrently > 1` and all messages
are consumed (#300)
2. Fix type definition for `Kafka()` constructor and for passing topic configurations
to the `producer()` and `consumer()` in the promisified API (@davidkhala, #297, #321).
# confluent-kafka-javascript v1.3.0

@@ -9,3 +22,10 @@

## Fixes
1. Support Protobuf oneof fields in Data Contract rules (#261)
2. Ensure use of DEK object is thread-safe (#268)
3. Fix token fetch to return after successful request (#278)
4. Add loose OAuth authorization (#289)
# confluent-kafka-javascript v1.2.0

@@ -12,0 +32,0 @@

const {
partitionKey,
DeferredPromise,
} = require('./_common');

@@ -77,2 +78,4 @@ const { LinkedList } = require('./_linked-list');

/* Promise that is resolved when there are available partitions. */
#availablePartitionsPromise = new DeferredPromise();

@@ -134,2 +137,3 @@ constructor(logger) {

cache._node = this.#availablePartitions.addLast(cache);
this.notifyAvailablePartitions();
}

@@ -202,2 +206,3 @@ cache._add(message);

ppc._assigned = false;
this.notifyAvailablePartitions();
}

@@ -266,4 +271,19 @@ }

}
/**
* Notifies awaiters that there are available partitions to take.
*/
notifyAvailablePartitions() {
this.#availablePartitionsPromise.resolve();
this.#availablePartitionsPromise = new DeferredPromise();
}
/**
* Promise that resolved when there are available partitions to take.
*/
async availablePartitions() {
return this.#availablePartitionsPromise;
}
}
module.exports = MessageCache;

2

lib/util.js

@@ -55,2 +55,2 @@ /*

util.bindingVersion = '1.3.0';
util.bindingVersion = '1.3.1-rc1';
{
"name": "@confluentinc/kafka-javascript",
"version": "1.3.0",
"version": "1.3.1-rc1",
"description": "Node.js bindings for librdkafka",

@@ -5,0 +5,0 @@ "librdkafka": "2.10.0",

@@ -116,2 +116,3 @@ Confluent's JavaScript Client for Apache Kafka<sup>TM</sup>

| 1.3.0 | 2.10.0 |
| 1.3.1 | 2.10.0 |

@@ -118,0 +119,0 @@ This mapping is applicable if you're using a pre-built binary. Otherwise, you can check the librdkafka version with the following command:

@@ -1,3 +0,8 @@

import { ConsumerGlobalConfig, GlobalConfig, ProducerGlobalConfig } from './config'
import {
ConsumerGlobalConfig,
ConsumerTopicConfig,
GlobalConfig,
ProducerGlobalConfig,
ProducerTopicConfig } from './config'
import {
ConsumerGroupStates,

@@ -97,3 +102,3 @@ GroupOverview,

export class Kafka {
constructor(config: CommonConstructorConfig)
constructor(config?: CommonConstructorConfig)
producer(config?: ProducerConstructorConfig): Producer

@@ -135,3 +140,5 @@ consumer(config: ConsumerConstructorConfig): Consumer

export interface ProducerConstructorConfig extends ProducerGlobalConfig {
type ProducerGlobalAndTopicConfig = ProducerGlobalConfig & ProducerTopicConfig;
export interface ProducerConstructorConfig extends ProducerGlobalAndTopicConfig {
kafkaJS?: ProducerConfig;

@@ -240,3 +247,5 @@ }

export interface ConsumerConstructorConfig extends ConsumerGlobalConfig {
export type ConsumerGlobalAndTopicConfig = ConsumerGlobalConfig & ConsumerTopicConfig;
export interface ConsumerConstructorConfig extends ConsumerGlobalAndTopicConfig {
kafkaJS?: ConsumerConfig;

@@ -243,0 +252,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet