moleculerjs / moleculer

:rocket: Progressive microservices framework for Node.js
https://moleculer.services/
MIT License
6.16k stars 587 forks source link

Duplicated MOL.RES.$nodeId topic in mqtt #972

Closed jordibaliellas closed 3 years ago

jordibaliellas commented 3 years ago

Prerequisites

Current Behavior

We have two services, one of them calls the other with a call to an action. We don't know why, but the action got the call 2 times. We thought it was a failure of our software, but we saw that the MOL.REQ.$nodeId only run once. and MOL.RES.$nodeId push the same body twice. with the same id

Is it normal behavior?

We are not able to know when it happens, if we restart our mqtt server... making calls very fast... but it happens

Expected Behavior

If I did one call, I want to receive one call.

Failure Information

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

I know that it is little information, at the moment we do not have more and we do not know how to reproduce it

Reproduce code snippet

const broker = new ServiceBroker({
    transporter: config.transporterUri, // mqtt://broker:1883
    logger: true,
  });

  broker.createService({
    name: "publisher",
    actions: { save, stream },
  });

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Thanks in advance

icebob commented 3 years ago

Reproduce code is not sufficient.