clebertsuconic commented on a change in pull request #2577: ARTEMIS-1604 
Artemis deadlock using MQTT Protocol
URL: https://github.com/apache/activemq-artemis/pull/2577#discussion_r264429455
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ##########
 @@ -249,7 +253,7 @@
 
    private volatile boolean directDeliver = true;
 
-   private volatile boolean supportsDirectDeliver = true;
+   private volatile boolean supportsDirectDeliver = false;
 
 Review comment:
   I understand this is settled, but let me explain with my words, to make sure 
you understand.. and I'm not wrong.
   
   The reason we disable direct deliver is certain protocols won't have the 
locking support to deal with direct delivery, and they may dead lock.
   
   So, with MQTT what I believe it could happen is.. supports= true, now you 
add a consumer, it becomes false.
   
   If an user, out of an anti-pattern creates and deletes consumers rapidly 
while sending messages this could lead to races on delivering.
   
   This is just for that kind of anti-pattern.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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