Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

no-kafka

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-kafka - npm Package Compare versions

Comparing version 2.8.0 to 2.8.1

47

lib/client.js

@@ -19,3 +19,3 @@ 'use strict';

asyncCompression: false,
brokerRedirection: self.brokerNullRemap,
brokerRedirection: false,
reconnectionDelay: {

@@ -124,4 +124,4 @@ min: 1000,

Client.prototype.checkBrokerRedirect = function (host, port) {
var self = this, fullName, fullNameProtocol;
var redirect = self.options.brokerRedirection;
var fullName, fullNameProtocol;
var redirect = this.options.brokerRedirection;

@@ -159,8 +159,7 @@ // No remapper

Client.prototype.brokerNullRemap = function (host, port) {
// Default function.
return {
host: host,
port: port
};
Client.prototype.nextCorrelationId = function () {
if (this.correlationId === 2147483647) {
this.correlationId = 0;
}
return this.correlationId++;
};

@@ -234,3 +233,3 @@

Client.prototype.metadataRequest = function (topicNames) {
var self = this, buffer, correlationId = self.correlationId++;
var self = this, buffer, correlationId = self.nextCorrelationId();

@@ -342,3 +341,3 @@ buffer = self.protocol.write().MetadataRequest({

return Promise.all(_.map(requests, function (topics, leader) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().ProduceRequest({

@@ -376,3 +375,3 @@ correlationId: correlationId,

return Promise.all(_.map(requests, function (topics, leader) {
var buffer, correlationId = self.correlationId++;
var buffer, correlationId = self.nextCorrelationId();
// fake LeaderNotAvailable for all topics with no leader

@@ -426,3 +425,3 @@ if (leader === -1 || !self.brokerConnections[leader]) {

return Promise.all(_.map(requests, function (topics, leader) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().OffsetRequest({

@@ -447,3 +446,3 @@ correlationId: correlationId,

return Promise.all(_.map(requests, function (topics, leader) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().OffsetCommitRequestV0({

@@ -470,3 +469,3 @@ correlationId: correlationId,

return Promise.all(_.map(requests, function (topics, leader) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().OffsetFetchRequest({

@@ -493,3 +492,3 @@ correlationId: correlationId,

return self._findGroupCoordinator(groupId).then(function (connection) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().OffsetFetchRequest({

@@ -526,3 +525,3 @@ correlationId: correlationId,

Client.prototype._findGroupCoordinator = function (groupId) {
var self = this, buffer, correlationId = self.correlationId++;
var self = this, buffer, correlationId = self.nextCorrelationId();

@@ -566,3 +565,3 @@ if (self.groupCoordinators[groupId] && !self.groupCoordinators[groupId].isRejected()) {

return self._findGroupCoordinator(groupId).then(function (connection) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().JoinConsumerGroupRequest({

@@ -591,3 +590,3 @@ correlationId: correlationId,

return self._findGroupCoordinator(groupId).then(function (connection) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().HeartbeatRequest({

@@ -615,3 +614,3 @@ correlationId: correlationId,

return self._findGroupCoordinator(groupId).then(function (connection) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().SyncConsumerGroupRequest({

@@ -640,3 +639,3 @@ correlationId: correlationId,

return self._findGroupCoordinator(groupId).then(function (connection) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().LeaveGroupRequest({

@@ -664,3 +663,3 @@ correlationId: correlationId,

return self._findGroupCoordinator(groupId).then(function (connection) {
var correlationId = self.correlationId++;
var correlationId = self.nextCorrelationId();
var buffer = self.protocol.write().OffsetCommitRequestV2({

@@ -685,3 +684,3 @@ correlationId: correlationId,

Client.prototype.listGroupsRequest = function () {
var self = this, buffer, correlationId = self.correlationId++;
var self = this, buffer, correlationId = self.nextCorrelationId();

@@ -703,3 +702,3 @@ return self._waitMetadata().then(function () {

Client.prototype.describeGroupRequest = function (groupId) {
var self = this, correlationId = self.correlationId++;
var self = this, correlationId = self.nextCorrelationId();

@@ -706,0 +705,0 @@ return self._findGroupCoordinator(groupId).then(function (connection) {

@@ -185,2 +185,6 @@ 'use strict';

/*if (!this.queue.hasOwnProperty(correlationId)) {
console.error('Wrong correlationId received:', correlationId);
}*/
this.queue[correlationId].resolve(data.slice(4, length + 4));

@@ -187,0 +191,0 @@ delete this.queue[correlationId];

@@ -9,3 +9,3 @@ {

},
"version": "2.8.0",
"version": "2.8.1",
"main": "./lib/index.js",

@@ -12,0 +12,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc