Open ivcosla opened 1 year ago
If I comment this line: https://github.com/nestjs/nest/blob/master/packages/microservices/nest-microservice.ts#LL159C13-L159C13 the event is emitted only once.
NestApplication
doesn't calls super.init()
inside it's init()
method, whereas NestMicroservice
does. Maybe is that it?.
Is there an existing issue for this?
Current behavior
When
NestFactory
is used to build a microservice app, and theninit
is called for it, any attempt to send a message through theEventBus
will result in theEventsListener
's being called twice with the event.Minimum reproduction code
https://gist.github.com/ivcosla/908e717af746801787cced1f80c1c327
Steps to reproduce
Expected behavior
The
EventsHandler's
for the emitted event should be called only once.Package version
10.0.0
NestJS version
10.0.0
Node.js version
20.3.0
In which operating systems have you tested?
Other
No response