Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird multiple-subscription #49

Open
pewh opened this issue Oct 13, 2017 · 2 comments
Open

Weird multiple-subscription #49

pewh opened this issue Oct 13, 2017 · 2 comments
Assignees
Labels

Comments

@pewh
Copy link

pewh commented Oct 13, 2017

Hello,

I have set ACL on redis for topic "inbox/123" with value 3 (which means support both pub & sub)

Later, I subscribe "inbox/#" topic. When I publish "inbox/123", I don't receive message.

But if I subscribe "inbox/#" and "inbox/123" topics, and publish "inbox/123", then I receive message for each topics (inbox/# and inbox/123).

Is this normal behavior?

@pewh
Copy link
Author

pewh commented Oct 13, 2017

My use case is: there will be many "inbox/<id>" topics with each ACL. If user subscribe "inbox/#", then it will receive message from topic that has matched ACL.

For example:
topics:
inbox/1, with ACL for user: 123
inbox/2, with ACL for user: 456
inbox/3, with ACL for user: 123

user 123 subscribe "inbox/#"
user 456 subscribe "inbox/#"

if admin publish message with topic "inbox/1", then "user 123" should be receive message, but "user 456" shouldn't receive message.

My question is: am I doing correct for this mqtt pattern (or is there any bad side-effect)? Can emqtt doing things like my usage? Thank you.

@turtleDeng
Copy link
Member

turtleDeng commented Dec 31, 2019

Hi, @pewh Sorry for the late reply,Do you resolve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants