New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(shared_sub): restore support for $queue/
shared subscription
#11281
fix(shared_sub): restore support for $queue/
shared subscription
#11281
Conversation
Partially addresses: https://emqx.atlassian.net/browse/EMQX-4589 There's still a problem with the handling of shared groups that is _not particular to the `$queue/` syntax_ and preexistent that the same client cannot subscribe to _different groups_ that have the same _topic filter_.
1e7e080
to
1fdcfba
Compare
The issue about unsubscribing to shared topics and subscribing to different groups/same topic filters is tracked by https://emqx.atlassian.net/browse/EMQX-9876, and there's some progress here: #10976 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
馃憤馃徏
emqx_topic:join([<<"$share">>, Group, Topic]); | ||
filename:join([<<"$share">>, Group, Topic]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably not what we want, i.e. emqx_topic:join/1
is the proper way to do things here. Otherwise, the results will be different between Linux and Windows for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
鉁旓笍
@@ -986,6 +988,112 @@ t_session_kicked(Config) when is_list(Config) -> | |||
?assertEqual([], collect_msgs(0)), | |||
ok. | |||
|
|||
%% FIXME: currently doesn't work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe add why it's not working (or what it needs to work)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few comments in other places, and the PR number can be referenced from the merge commit, I guess.
targeting
release-51
Partially addresses: https://emqx.atlassian.net/browse/EMQX-4589
There's still a problem with the handling of shared groups that is not particular to the
$queue/
syntax and preexistent that the same client cannot subscribe to different groups that have the same topic filter.Summary
馃 Generated by Copilot at 1e7e080
This pull request implements the queue subscription feature, which allows clients to subscribe to a topic as a queue group and receive messages in a load-balanced way. It modifies the
emqx.hrl
,emqx_topic.erl
, andemqx_mgmt_api_subscriptions.erl
files to handle the new$queue
topic prefix and the related options. It also updates and adds test cases inemqx_shared_sub_SUITE.erl
,emqx_topic_SUITE.erl
, andemqx_proper_types.erl
to test the new feature and ensure its correctness.PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md
filesChecklist for CI (.github/workflows) changes
changes/
dir for user-facing artifacts update