AlariCode / nestjs-rmq

A custom library for NestJS microservice. It allows you to use RabbitMQ or AMQP.
https://purpleschool.ru
MIT License
285 stars 38 forks source link

Bugfix/detach emitters #11

Closed mjarmoc closed 4 years ago

mjarmoc commented 4 years ago

This PR solves the following problem:

BUG: After reconnection (broker died) the client sends a response for RPC n + 1 times, where n is the number of reconnections.

SOLUTION: Detach listeners from response emitter on disconnect event and reattach them on connect (is dispatched on connect or reconnect).

AlariCode commented 4 years ago

Thx for bugfix!