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](048afa6d2d/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
This commit is contained in:
Thales Macedo Garitezi 2021-12-29 15:08:49 -03:00 committed by GitHub
commit 3fc8d4049f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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