Comments (5)
Hey, contributions are welcome! For session there needs to be a cluster-level session management implemented, which we don't have right now in the broker. Emitter is not a MQTT broker per say, since it's clustered and AP (in CAP terms). So we need to think how to keep the session state between connections.
from go.
I know, let me think about the cluster-level session.
I now have another problem. QoS=1 or QoS=2. I modified the client code and added QoS = 2, but it did not achieve the expected effect. QoS = 1 is the same.
For example: when the client is disconnected, the previous messages cannot be received after restarting, and only the latest ones can be received.
Is it because I have a misunderstanding of the MQTT protocol?
QoS =1 received at most once
QoS = 2 Only received once
from go.
I know the source of the problem.
emitter code :
func (c *Conn) Send(m *message.Message) (err error) {
defer c.MeasureElapsed("send.pub", time.Now())
packet := mqtt.Publish{
Header: mqtt.Header{QOS: 0},
Topic: m.Channel, // The channel for this message.
Payload: m.Payload, // The payload for this message.
}
_, err = packet.EncodeTo(c.socket)
return
}
Header: mqtt.Header{QOS: 0}
No matter what you configure QoS when publishing, the QoS received when subscribing will output 0
It makes me sad.
@kelindar Do I understand this?
from go.
I see that QoS may not matter because there is no cluster-level session management
from go.
I'm going to read the emitter code carefully and think about it
from go.
Related Issues (19)
- On sample code, PresenceEvent with Changes=true shows empty Who[], Occupancy 0 HOT 6
- uuid error
- Migrate from vendor to go modules HOT 1
- Reconnection fails HOT 15
- WithFrom and WithUntil options - Do they really work? HOT 8
- Subcribe and Publish methods does not send any errors HOT 2
- gomobile HOT 3
- tinygo for embedded HOT 2
- Getting race during reconnect HOT 2
- Message handlers not called HOT 1
- Two questions, Presence and the message history question
- can not get client ID
- multiple-value uuid.NewV1() in single-value context HOT 1
- GenerateKey goes into deadlock state under load HOT 1
- assignment mismatch: 2 variables but 1 values HOT 3
- please update vender "github.com/satori/go.uuid" to v1.2.0 HOT 7
- github.com/emitter-io/go/options.go:33:10: assignment mismatch: 2 variables but 1 values HOT 3
- On sample code, Occupancy always shows 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.