moleculerjs / moleculer-channels

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

Loosing subscriber connection to Kafka #73

Open PaulShpilsher opened 1 year ago

PaulShpilsher commented 1 year ago

We are using channels (Kafka message broker) and from time to time (pretty much at least once a day) without any indications warnings or errors the subscriber connection to Kafka topic gets dropped while other code in service-node (like actions handlers) keep working fine. We detect this by seeing that the messages in topics are not read by subscribers.

So far the only solution we’ve found is to restart the service-node. On fresh start the channels reconnect to Kafka topics and for a while everything works until again the connection to Kafka topic gets dropped.

Is there a mechanism to reconnect to the message broker (Kafka) when it (or whatever) drops the subscriber connection?

Or get some sort notification from the framework that we’re not connected anymore?

Thank you!

icebob commented 12 months ago

Hi, it would be good to somehow reproduce the issue that we can investigate the subscription logic at reconnecting. Could you create a repro code? Do you connect to a local Kafka instance, or remote, or a cluster...etc?