rabbitmq / rabbitmq-mqtt

RabbitMQ MQTT plugin
https://www.rabbitmq.com/mqtt.html
Other
174 stars 67 forks source link

mqtt plugin "duplicate client id" #193

Closed chopper-poet closed 5 years ago

chopper-poet commented 5 years ago

hi,friend I have used rabbitmq for my MQTT broker In the past few months,but recently i find a issue, that is "if a client start more than one connection request and those requests be routed to same rabbitmq node ,this node will hint 'MQTT disconnecting duplicate client id' and close some duplicate connection,finally one clientId just have one connection .But if those requests be routed to different nodes,one clientId will have multiple connections,that's bad",here is my network topology: client->nginx->rabbitmq cluster(three nodes)

Here is my nginx config: upstream ts_rabbitmq_backend { server 10.200.46.92:1883; server 10.200.46.94:1883; server 10.200.41.28:1883; }

Client use nginx address start a connection,and nginx random route connection to one of rabbitmq nodes.

What i should do this?

thks!

michaelklishin commented 5 years ago

Duplicate of #91.

michaelklishin commented 5 years ago

We plan on making client ID tracking clusterwide. No ETA promises but the latest it can happen is 3.9. Right now you can avoid depending on unique client IDs or store them e.g. in a service such as etcd or Consul, since the problem most users solve with it is that of consumer coordination.