New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kafka-observe

Package Overview
Dependencies
Maintainers
3
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kafka-observe - npm Package Compare versions

Comparing version 2.1.1-beta-3 to 2.1.1-beta-4

16

controllers/stream.controller.js

@@ -6,4 +6,3 @@ const { filter } = require("rxjs/operators");

module.exports = {
write: ({ producer }) => ({ topic, headers, event, payload, limit = 666666 }) => {
// Divide by 3 because string char can have up to 4 (in rare cases) bytes per char
write: ({ producer }) => ({ topic, headers, event, payload, limit = 819200 }) => {
const data = JSON.stringify(payload);

@@ -14,14 +13,17 @@ const totalSize = data.length;

for (let page = 1; page <= total; page++) {
const offset = (page - 1) * limit;
const result = data.slice(offset, offset + limit);
producer.sendMessage({
headers: {
...headers,
totalSize,
page: page,
page,
total,
limit,
isFinished: page === total,
totalSize,
size: result.length,
},
topic,
payload: {
payload: data.slice((page - 1), limit),
payload: result,
event,

@@ -77,3 +79,3 @@ },

if (!item.headers.isFinished) {
if (Object.keys((result || {})).length !== item.headers.total) {
return;

@@ -80,0 +82,0 @@ }

{
"name": "kafka-observe",
"version": "2.1.1-beta-3",
"version": "2.1.1-beta-4",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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