Skip to content

Enabling a kafka producer seems to result in invincible processes #19

@atamon

Description

@atamon

At least they won't shutdown by themselves, so someone has to force them.

Minimal repro:

const KakfaCache = require('kafka-cache');

process.on('unhandledRejection', (err, p) => {
  console.error(err);
  console.error(p);
  if (err.message === 'This should shut shit down!') process.exit(0);
  else process.exit(1);
});

async function run() {

  const cache = KakfaCache.create({
    kafkaHost: 'kafka:9092',
    topic: 'foobar',
    readOnly: false
  });

  await cache.onReady();

  throw new Error('This should shut shit down!');
}

run();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions