Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] On Paho's opinionated URI validation

I maintain Machine Head [1] and work on a project that provides
applications with URI's to connect to an MQTT capable broker

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:

This 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:// but not tcp:// (with a trailing slash)

tcp:// and tcp:// 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.

Thank you.

Back to the top