michaelandrepearce commented on a change in pull request #2569: ARTEMIS-2263
Support queue level auto-delete configuration
URL: https://github.com/apache/activemq-artemis/pull/2569#discussion_r260577387
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
##########
@@ -1591,38 +1571,9 @@ public void run() {
@Override
public void run() {
- Map<SimpleString, Binding> nameMap = addressManager.getBindings();
-
- List<Queue> queues = new ArrayList<>();
-
- for (Binding binding : nameMap.values()) {
- if (binding.getType() == BindingType.LOCAL_QUEUE) {
- Queue queue = (Queue) binding.getBindable();
-
- queues.add(queue);
- }
- }
-
- for (Queue queue : queues) {
- int consumerCount = queue.getConsumerCount();
- long messageCount = queue.getMessageCount();
- boolean autoCreated = queue.isAutoCreated();
- long consumerRemovedTimestamp =
queue.getConsumerRemovedTimestamp();
-
- if (!queue.isInternalQueue() && autoCreated && messageCount == 0
&& consumerCount == 0 && consumerRemovedTimestamp != -1) {
Review comment:
This was duplicated logic with QueueManager so have deduped.
----------------------------------------------------------------
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