wind-c / comqtt

A lightweight, high-performance go mqtt server(v3.0|v3.1.1|v5.0) supporting distributed cluster
MIT License
869 stars 50 forks source link

comqtt:cl gateways are missing #86

Closed fcrbat closed 3 months ago

fcrbat commented 3 months ago

Hi,

I'm using your software since a few months and its genius! Thank you for your work.

I experenced some issues, I have two gateways and one is missing from "comqtt:cl", the funny thing is that I still get updates from the missing gateway and the last messages from comqtt are for both gateways: { "action":"connect" "timestamp":1711650090 } { "action":"connect" "timestamp":1711650090 }

We are using this software for a new project and I wanted to ask if there is a way to fund your work?

Best Regards, René

wind-c commented 3 months ago

I don't understand your question. Can you describe the problem in detail?

fcrbat commented 3 months ago

Sure, there should be two connected mqtt-clients in redis comqtt:cl but only one is shown. I run the cluster-version with three nodes and use redis as db inbetween them. Overtime one mqtt-client is lost and only one is shown: hgetall "comqtt:cl" 1) "41B34559-C1A2-42C8-8A6F-BB611933DCC5" 2) "{\"will\":{},\"properties\":{},\"username\":\"NjZ6cW84aDI=\",\"id\":\"41B34559-C1A2-42C8-8A6F-BB611933DCC5\",\"remote\":\"192.168.12.106:36000\",\"listener\":\"tcp\",\"protocolVersion\":4,\"clean\":true}"

The interresting thing is that I still get messages from the other mqtt-client and the last info for this mqtt-client from comqtt is action: disconnect. The reason I'm asking is that I provide the connection-status to the user and it shows wrong values like disconnect, even if the connection is working and I get messages from that mqtt-client.

wind-c commented 3 months ago

If the client is disconnected and clean session=true, the cli from redis is deleted.

fcrbat commented 3 months ago

thank you, I'm going to observe it with more clients.