[
https://issues.apache.org/jira/browse/ARTEMIS-1300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094116#comment-16094116
]
ASF GitHub Bot commented on ARTEMIS-1300:
-----------------------------------------
Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1410#discussion_r128416905
--- Diff:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
---
@@ -828,6 +834,11 @@ public void removeConsumer(final Consumer consumer) {
}
}
+ if (consumerList.isEmpty()) {
+ // reset when all consumers are removed
+ supportsDirectDeliver = true;
--- End diff --
should maybe iterate the consumers list and set to true if all consumers
support direct? e.g. was 3 consumers, 2 core and 1 amqp, then the amqp one
removes, leaving 2 core would you want it to go back to direct.
e.g. (pseudo)
```
boolean supportsDirectDeliver = true;
for (consumer : consumerList) {
if (!consumer.supportsDirectDelivery()){
supportsDirectDeliver = false;
}
}
this.supportsDirectDeliver = supportsDirectDeliver;
```
> Sending Core & receiving AMQP can lead to deadlock when direct delivering
> -------------------------------------------------------------------------
>
> Key: ARTEMIS-1300
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1300
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: clebert suconic
> Assignee: clebert suconic
>
> I couldn't write a test for this, however I have seen this deadlock under
> high performance tests.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)