moleculerjs / moleculer-channels

Reliable messages for Moleculer services via external queue/channel/topic.
MIT License
75 stars 15 forks source link

[AMQP] Don't throw if already tracking messages #51

Closed AndreMaz closed 1 year ago

AndreMaz commented 1 year ago

Fixes https://github.com/moleculerjs/moleculer-channels/issues/49 Issue AMQP adapter has specific logic to handle the reconnection and you call the subscribe() method that tries init an entry to track active messages. However, it already exists so it throws an error.

Solution By adding a toThrow flag we can skip the Error and thus allow AMQP adapter to reconnect

image