onlyMIT commented on issue #2466: ARTEMIS-2206 The MQTT consumer reconnection 
caused the queue to not be cle…
URL: https://github.com/apache/activemq-artemis/pull/2466#issuecomment-453845902
 
 
   @jbertram I have a question to consult you and hope you can answer it.
   1. Why is there MULTICAST and ANYCAST routing types for Artemis 
subscriptions to MQTT.I think there should be only MULTICAST routing type in 
the MQTT protocol.
   Perhaps the purpose of this design is to enable Artemis' MQTT implementation 
to support both publish/subscribe and shared consumption functions.But it 
doesn't seem to support that.But it doesn't like to support this feature.
   Two consumers using the same clientId, defining the same topic on separate 
nodes, produce ANYCAST addresses(as 
`org.apache.activemq.artemis.tests.integration.mqtt.imported.MqttClusterRemoteSubscribeTest`).However,
 two consumers using the same clientId subscribe to the same address in the 
same node, and the latter consumer connection will cause the former consumer 
connection to be forcibly closed, and no ANYCAST address will be generated.
   
   Even these are not problems. But this will export when using different 
keys(use addressName as key or use "clientId+'.'+addressName" as key) to store 
the binding, we can't make sure that all calls to the `locateQueue(SimpleString 
queueName)` method take this into account(as in `addSubscription` method,only 
use "clientId+'.'+addressName" as key to call `locateQueue(SimpleString 
queueName)` .I think most people are not aware of this detail when calling the 
locateQueue(SimpleString queueName) method or even if it is easy to be ignored, 
it is very unsafe.
   
   I hope you can help me identify the problem so that I can determine how to 
solve it.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to