GithubHelp home page GithubHelp logo

I want to join developers about go HOT 5 CLOSED

emitter-io avatar emitter-io commented on May 27, 2024
I want to join developers

from go.

Comments (5)

kelindar avatar kelindar commented on May 27, 2024 1

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.

uppercaveman avatar uppercaveman commented on May 27, 2024

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.

uppercaveman avatar uppercaveman commented on May 27, 2024

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.

uppercaveman avatar uppercaveman commented on May 27, 2024

I see that QoS may not matter because there is no cluster-level session management

from go.

uppercaveman avatar uppercaveman commented on May 27, 2024

I'm going to read the emitter code carefully and think about it

from go.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.