Closed me23 closed 1 year ago
This is not related to channels as I can repro the issue even without it. Here's a repro code
"use strict";
const { ServiceBroker } = require("moleculer");
// Create broker
const broker = new ServiceBroker({
disableBalancer: true,
transporter: "amqp://localhost:5672",
});
broker.start().then(async () => {
// broker.repl();
console.log("Broker started");
// await broker.Promise.delay(1000);
await broker.stop();
});
Note: With added delay(1000)
the issue disappears.
I also managed to repro the issue with amqplib ^0.8.0
, ^0.9.0
, ^0.10.0
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Current Behavior
Maybe it correspond to this issue: https://github.com/moleculerjs/moleculer-channels/issues/49
I start a service with amqp-transport (rabbitmq) and moleculer-channels listen to a given topic. If i start a client with(
disableBalancer:true
) which send to this channel and then exit afterwards, than i get this error message :If i change
disableBalancer:false
the error-message went away.Expected Behavior
The client should exit without error message, even with
disableBalancer:true
Failure Information
Steps to Reproduce
I've created a minimal-repo here: https://github.com/me23/moleculer-channels-amqp-test.git
clone repo and change path to it
if you don't have an Rabbitmq running on localhost you could start one with docker: docker-compose up
start the service: node source/service.js
start the client: node source/client.js
you get the error
start the client with disableBalancer:false: node source/clientOk.js
you get no error message