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

kafka-avro

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kafka-avro - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "kafka-avro",
"version": "1.0.2",
"version": "1.0.3",
"main": "./lib/kafka-avro",

@@ -5,0 +5,0 @@ "description": "Node.js bindings for librdkafka with Avro schema serialization.",

@@ -257,4 +257,9 @@ # kafka-avro

[Use the kafka-avro-stub library](https://github.com/waldophotos/kafka-avro-stub) to avoid requiring Kafka and Schema Registry to run on your local for testing your service.
You can use `docker-compose up` to up all the stack before you call your integration tests with `npm test`. How the integration tests are outside the containers, you will need set you `hosts` file to :
```
127.0.0.1 kafka
```
## Releasing

@@ -261,0 +266,0 @@

@@ -24,3 +24,2 @@ /*

level: 'trace',
// stream: {write: function() {}},
stream: fmt({

@@ -33,4 +32,3 @@ outputMode: 'long',

testLib.KAFKA_SCHEMA_REGISTRY_URL = 'http://localhost:8081';
// testLib.KAFKA_SCHEMA_REGISTRY_URL = 'http://schema-registry-confluent.internal.dev.waldo.photos';
testLib.KAFKA_BROKER_URL = 'localhost:9092';
testLib.KAFKA_BROKER_URL = 'kafka:9092';

@@ -37,0 +35,0 @@ testLib.topic = schemaFix.name;

@@ -19,7 +19,4 @@ /**

this.consOpts = {
// 'debug': 'all',
'group.id': 'testKafkaAvro' + crypto.randomBytes(20).toString('hex'),
'enable.auto.commit': true,
// 'auto.offset.reset': 'earliest',
// 'session.timeout.ms': 1000,
};

@@ -39,3 +36,2 @@

return this.kafkaAvro.getProducer({
// 'debug': 'all',
'dr_cb': true,

@@ -125,12 +121,3 @@ })

this.producer.produce(testLib.topic, -1, message, 'key');
}, 4000);
// //need to keep polling for a while to ensure the delivery reports are received
// var pollLoop = setInterval(function () {
// this.producer.poll();
// if (this.gotReceipt) {
// clearInterval(pollLoop);
// this.producer.disconnect();
// }
// }.bind(this), 1000);
}, 10000);
});

@@ -170,3 +157,3 @@

this.producer.produce(topicName, -1, message, 'key');
}, 4000);
}, 10000);
});

@@ -218,3 +205,3 @@

this.producer.produce(testLib.topic, -1, message, 'key');
}, 2000);
}, 10000);
});

@@ -227,4 +214,2 @@ });

var isDone = false;
var message = {

@@ -235,2 +220,4 @@ name: 'Thanasis',

var isDone = false;
this.kafkaAvro.getConsumerStream(this.consOpts, { 'enable.auto.commit': true }, { topics: [ testLib.topic, testLib.topicTwo ] })

@@ -251,3 +238,6 @@ .then(function (consumerStream) {

expect(data.long).to.equal(message.long);
if (!isDone) done();
if (!isDone) {
consumerStream.consumer.disconnect();
done();
}
isDone = true;

@@ -261,3 +251,3 @@ });

this.producer.produce(testLib.topic, -1, message, 'key');
}, 2000);
}, 10000);
});

@@ -290,3 +280,3 @@

expect(data.long).to.equal(message.long);
consumerStream.consumer.disconnect();
done();

@@ -299,5 +289,5 @@ });

this.producer.produce(topicName, -1, message, 'key');
}, 2000);
}, 10000);
});
});
});

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

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