moleculerjs / moleculer-channels

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

Redis Cluster Configuration Issue #43

Closed valeeum closed 2 years ago

valeeum commented 2 years ago

Prerequisites

Please answer the following questions for yourself before submitting an issue.

Current Behavior

I'm currently running a Redis cluster and noticed that defining the "cluster" parameter at the top level per the Readme was not connecting successfully. After looking at the source code, I noticed that the "cluster" property needs to be defined under the "redis" property.

Expected Behavior

Cluster configuration per instructions in Readme should result in successful connection to cluster.

Failure Information

Steps to Reproduce

Reproduce code snippet

This does NOT work:

ChannelsMiddleware({
        adapter: {
          type: "Redis",
          options: {
            cluster: { nodes: [ ... ]},
            redis: {
              consumerOptions: { .... }
          }
    }
}

This DOES works:

ChannelsMiddleware({
        adapter: {
          type: "Redis",
          options: {
            redis: {
              cluster: { nodes: [ ... ]},
              consumerOptions: { .... }
          }
    }
}

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

N/A

icebob commented 2 years ago

Good catch, thanks!