eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.15k stars 467 forks source link

Please add 'topic' as an alias for 'destinationName' #29

Closed jpwsutton closed 8 years ago

jpwsutton commented 8 years ago

migrated from Bugzilla #433811 status RESOLVED severity enhancement in component MQTT-JS for 1.1 Reported in version unspecified on platform All Assigned to: Andrew Banks

On 2014-04-30 02:10:19 -0400, Jan-Piet Mens wrote:

mqttws31.js calls the MQTT topic 'destinationName' which is a bit confusing (as well as being long to type :-)

Would it be possible to add an "alias" to it to call it "topic"? This is more in line with the MQTT terminology, and an alias would not break old code which relies on destinationName.

On 2014-04-30 07:29:21 -0400, Ian Craggs wrote:

The latest version of the spec uses "topic filter" and "topic name" for when wildcards are allowed and when they are not, respectively. I realize that topicFilter and topicName are not as short... I just thought I'd mention it :-)

On 2014-07-03 09:38:08 -0400, Al Stockdill-Mander wrote:

As the field is directly editable (and not an aliasable type like an array or object) adding an "alias" means adding another field to Message and ensuring the content of both is kept in sync. I agree the naming is not ideal but I'm not in favour of a breaking change. closing as wontfix