alihanyalcin / mqtt-wrapper

mqtt-wrapper provides easy-to-use MQTTv3 and MQTTv5 client
MIT License
14 stars 0 forks source link

MQTT5 TLS support & Query #10

Closed sabsantina closed 3 years ago

sabsantina commented 3 years ago

Hey, thanks for providing this excellent wrapper! I was wondering when TSL support will be implemented.

As to the query: is there a possibility that Request will be implemented for MQTT3?

alihanyalcin commented 3 years ago

Hi @sabsantina, TLS support added for mqttv5 client, but not tested yet.

Request-Response is feature of MQTT v5, can be achieved programmatically for MQTT v3.

sabsantina commented 3 years ago

Thank you for the quick response and for adding TLS support!

sabsantina commented 3 years ago

On an unrelated note, would it be possible to allow someone to pass the response topic for this function

// Request sends a message to broker and waits for the response.
func (m *mqttv5) Request(topic string, payload interface{}, timeout time.Duration, h handler)

At the moment, the current format does not allow for what I need. Thank you