I maintain Machine Head [1] and work on a project that provides
applications with URI's to connect to an MQTT capable broker
(RabbitMQ).
I generally find Paho Java a pretty nice library but a couple of things
stand out as odd usability issues.
One of them is URI validation that Paho performs. Here's the exact
code that does it:
https://gist.github.com/michaelklishin/71eaeb702a7af4a20c41This raises two questions:
* Why is there no standard mqtt:// scheme? This is very inconvenient for e.g. PaaS service providers that provide URI's that developers should use.
* Why won't Paho accept tcp://
127.0.0.1:1883 but not tcp://
127.0.0.1:1883/ (with a trailing slash)
tcp://
127.0.0.1:1883 and tcp://
127.0.0.1:1883/ are technically two different URI's but it's
pretty easy to see how a user may provide either and expect the same result.
Am I missing something? Would a patch that makes Paho treat
both "" and "/" as valid paths be accepted? What about a patch
that makes "mqtt" an alias for "tcp" and "mqtts" an alias for "ssl"?
Just to make it clear: both will not introduce any breaking changes.