At the moment the MqttBrokerConnection class assumes that the API user wants a TCP (+SSL) connection. MQTT is also specified for Websockets nowadays though. There might be additional transport protocols specified for MQTTv5.
Usecase
For example to talk to the amazon IOT (AWS) cloud that speaks MQTT on websockets.
Regression
The old API just required an URI string like "tcp://1.1.1.1:1234", which defeats any means of type safety and required an extra portion of parsing, but was nicely extensible.
Suggestion
Add a second constructor for this probably not so often used feature of selecting another protocol. I have this in mind:
Abstract
At the moment the MqttBrokerConnection class assumes that the API user wants a TCP (+SSL) connection. MQTT is also specified for Websockets nowadays though. There might be additional transport protocols specified for MQTTv5.
Usecase
For example to talk to the amazon IOT (AWS) cloud that speaks MQTT on websockets.
Regression
The old API just required an URI string like "tcp://1.1.1.1:1234", which defeats any means of type safety and required an extra portion of parsing, but was nicely extensible.
Suggestion
Add a second constructor for this probably not so often used feature of selecting another protocol. I have this in mind:
I would not introduce a Builder here, because all parameters are related to each other and basically resemble an URI and are easy to grasp.