moleculerjs / moleculer-channels

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

Initial Redis adapter #1

Closed AndreMaz closed 3 years ago

icebob commented 3 years ago

Some issues what I found:

1. Unsubscribe doesn't release the xreadgroup.

Repro:

  1. Start the simple dev
  2. destroy users
  3. p (publish) repl command
  4. The users service received the message and processed. image

2. Multiple channels block each other

If both channels enabled, the first won't receive messages after second. Repro

  1. Enable/uncomment my.second.topic channels in services
  2. npm run dev and wait for both message
  3. p (publish repl command which triggers the first channel)
  4. the new message is not processed by any services because the second xreadgroup blocks the first. image I feel we should create a redis client for every subscription :(

3. Strange error

Sometimes after few minutes running, I've got this error message a lot of times image

AndreMaz commented 3 years ago

I feel we should create a redis client for every subscription :(

That might work but it would generate a massive amount of clients per service.

I think if we set BLOCK to some value higher than 0 (e.g., 50) we might solve the 1) and 2).

Never seen the issue 3). Do you have replicas of redis (see https://github.com/helm/charts/issues/12851)?