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

will '$SYS/brokers/' publish match '#' or '+/#'? #68

Closed
emqplus opened this issue Mar 12, 2015 · 4 comments
Closed

will '$SYS/brokers/' publish match '#' or '+/#'? #68

emqplus opened this issue Mar 12, 2015 · 4 comments
Assignees
Milestone

Comments

@emqplus
Copy link
Contributor

emqplus commented Mar 12, 2015

No description provided.

@emqplus emqplus self-assigned this Mar 12, 2015
@emqplus emqplus added this to the 0.5.0 milestone Mar 12, 2015
@emqplus emqplus added the Task label Apr 16, 2015
@emqplus emqplus modified the milestones: 0.6.3, 0.5.0 Apr 16, 2015
@emqplus emqplus added question and removed Task labels May 2, 2015
@roytan883
Copy link

0.8.2 seems still can not use + on $SYS
I test :
$SYS/borkers/+/clients/+/connected
$SYS/borkers/emqttd@127.0.0.1/clients/+/connected
both can't receive client connect info

@emqplus
Copy link
Contributor Author

emqplus commented Jun 2, 2015

Two issues:

  1. The topic should be '$SYS/brokers/+/clients/+/connected', ‘borkers' in wiki is a spelling error.
  2. mosquito_pub/sub will generate a random clientId that contains '/', for example:
mosqpub/88741-iMac.loca

Then "clients/+/connected" cannot match the presence topics, have to use '$SYS/brokers/+/clients/#'

@emqplus
Copy link
Contributor Author

emqplus commented Jun 2, 2015

Example:

iMac:~ feng$ mosquitto_sub -t '$SYS/brokers/+/clients/#' -d
Client mosqsub/88740-iMac.loca sending CONNECT
Client mosqsub/88740-iMac.loca received CONNACK
Client mosqsub/88740-iMac.loca sending SUBSCRIBE (Mid: 1, Topic: $SYS/brokers/+/clients/#, QoS: 0)
Client mosqsub/88740-iMac.loca received SUBACK
Subscribed (mid: 1): 0
Client mosqsub/88740-iMac.loca received PUBLISH (d0, q0, r0, m0, '$SYS/brokers/emqttd@127.0.0.1/clients/mosqpub/88741-iMac.loca/connected', ... (105 bytes))
{"username":"undefined","ipaddress":"127.0.0.1","session":false,"protocol":3,"connack":0,"ts":1433243924}
Client mosqsub/88740-iMac.loca received PUBLISH (d0, q0, r0, m0, '$SYS/brokers/emqttd@127.0.0.1/clients/mosqpub/88741-iMac.loca/disconnected', ... (35 bytes))
{"reason":"normal","ts":1433243924}

@emqplus emqplus modified the milestones: 0.12.1, 0.6.3 Oct 10, 2015
@emqplus
Copy link
Contributor Author

emqplus commented Oct 11, 2015

The messages published to $SYS/# will not match topic filters: #, +/#...

@emqplus emqplus closed this as completed Oct 11, 2015
emqplus pushed a commit that referenced this issue Oct 11, 2015
fix issue #68, trie test, broker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants