Browse Source

Merge pull request #6571 from emqx/fix-sticky-shared-sub-conf

fix(config): add missing enum constructors for `shared_subscription_strategy`

Currently, there's [code](https://github.com/emqx/emqx/blob/048afa6d2d693f6c53e8103fa132362c5915e641/apps/emqx/src/emqx_shared_sub.erl#L270-L279) and tests that expect the possibility of
values `sticky`, `hash_topic` and `hash_clientid` in the
`node.shared_subscritpion_strategy` configuration, but the schema enum
does not contain those constructors.

There's also a `hash` constructor expected, but apparently it's just for backwards compatibility (same as `hash_clientid`), so maybe we can skip it in 5.0
Thales Macedo Garitezi 4 years atrás
parent
commit
3fc8d4049f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/emqx/src/emqx_schema.erl

+ 1 - 1
apps/emqx/src/emqx_schema.erl

@@ -828,7 +828,7 @@ fields("broker") ->
            })
       }
     , {"shared_subscription_strategy",
-       sc(hoconsc:enum([random, round_robin]),
+       sc(hoconsc:enum([random, round_robin, sticky, hash_topic, hash_clientid]),
           #{ default => round_robin
            })
       }