-
Notifications
You must be signed in to change notification settings - Fork 19
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
Check against non-mosquitto brokers #2
Comments
It doesn't depend upon the $SYS tree. It just specifically subscribes to it because in mosquitto, when you subscribe to '#' it doesn't automatically give you '$SYS/#' too. If the code is used with a broker that doesn't support $SYS with a special meaning, it shouldn't fail because it doesn't know anything about it? Having said that, the bridge might work a lot better if there was a way of getting a list of topics without getting the payloads too. |
ahhh in that case I am confused about how this is working (I didn't look very hard, and jumped to conclusions) I tried it with RabbitMQ and got no topics. Could be that it isn't responding in the expected manner. I'll have a play around with some other brokers too then. |
Weird behaviour with hivemq too (which does have $SYS) - it doesn't list any of the topics I manually publish retained messages on, but does list the $SYS tree and also lists # a number of times. I ran a bridge locally pointing at broker.mqtt-dashboard.com to test this out. |
Tested with Apache Apollo:
So it seems that with non-mosquitto or RSMB brokers the topic list is not getting populated properly. I'm curious if this is a difference in the way they are sending packets compared to the more common brokers. |
OK so I tried this simple code snippet #!/usr/bin/env ruby
require 'rubygems'
require 'mqtt'
MQTT::Client.connect('localhost',61613) do |client|
client.get('#') do |topic,message|
puts "#{topic}: #{message}"
end
end My original suspicion was that maybe Apollo etc were not properly returning the topics. That's not always true.
I'm going to post about this on the mqtt protocol Google group since it affects a number of the server implementations. |
@andypiper Thanks for pointing out the issue that HiveMQ sets the topic for the published retained message on subscriptions to "#" instead of the actual topic. I just fixed that issue and the fix will be available soon on mqttdashboard.com and the downloadable HiveMQ version will be replaced with the new one. We also updated our MQTT compliance test suite, that case was not covered yet. Thanks again for that thorough analysis! |
Thank you very much for doing this work to test against various brokers @andypiper. It was a job that I wasn't looking forward to! Would be really good to have a test suite than can be run against brokers to test conformance. |
Additional observations:
Still to test:
... plus various other hosted services like Xively, m2m.io etc. |
|
Currently the code relies on the $SYS topic tree (only RSMB and mosquitto support it) for the display of the topic list http://mqtt.org/wiki/doku.php/conventions#sys
We could do a check for $SYS existing as a topic and warn that the bridge cannot list the topics otherwise.
The text was updated successfully, but these errors were encountered: