srishina / mqtt.go Goto Github PK
View Code? Open in Web Editor NEWmqtt.go is a client library for the MQTTv5 protocol, written in Go. The users of the client library can use pull or push mechanism to receive messages.
License: MIT License
mqtt.go is a client library for the MQTTv5 protocol, written in Go. The users of the client library can use pull or push mechanism to receive messages.
License: MIT License
Hi,
In reviewing this library, I notice it doesn't implement client-side persistence for QoS>0, to facilitate retransmission in the case of disconnects or restarts. There appears to be an empty storage.go
.
Is there a list of features that are planned but not yet implemented? Perhaps a comparison against the MQTTv5 spec of necessary client behaviors?
Thanks!
mqtt.go/examples/client-pub/main.go
Line 74 in cc8c75d
I don't understand.
you parse the broker's address
u, err := url.Parse(broker)
how can the broker be behind a websocket in a go-client. When your client is go, you do not connect via websocket do you? You pick the schema based on who you are, not based who the broker is.
I can see maybe tha the client would want to select the transport, a go client can't select a websocket transport and webclient can;t select tcp tranport. So i see some schisophreny here. Think of use cases and document in these examples when are you giving the client the choice and when are you giving the broker (the backend) a choice. The client needs to understand whose choice they are exercising.
https://github.com/srishina/mqtt.go/blob/main/examples/client-pub/main.go#L109
err = client.Publish(context.Background(), &mqtt.Publish{TopicName: topic, QoSLevel: byte(qosLevel), Payload: []byte(payload)})
the separation of concerns between client.Publish
and mqtt.Publish
is not clear. i think i would drop the latter, just:
err = client.Publish(context.Background(), topic, qosLevel, []byte(payload)}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.