[ 
https://issues.apache.org/jira/browse/AMQ-9692?focusedWorklogId=1001853&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1001853
 ]

ASF GitHub Bot logged work on AMQ-9692:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Jan/26 19:53
            Start Date: 26/Jan/26 19:53
    Worklog Time Spent: 10m 
      Work Description: mattrpav commented on code in PR #1484:
URL: https://github.com/apache/activemq/pull/1484#discussion_r2729018265


##########
activemq-broker/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java:
##########
@@ -260,16 +260,21 @@ protected List<Subscription> 
addSubscriptionsForDestination(ConnectionContext co
     }
 
     @Override
-    public void removeDestination(ConnectionContext context, 
ActiveMQDestination destination, long timeout)
-            throws Exception {
-
+    public void removeDestination(ConnectionContext context, 
ActiveMQDestination destination, long timeout) throws Exception {
         // No timeout.. then try to shut down right way, fails if there are
         // current subscribers.
         if (timeout == 0) {
             for (Iterator<Subscription> iter = 
subscriptions.values().iterator(); iter.hasNext();) {
                 Subscription sub = iter.next();
                 if (sub.matches(destination) ) {
-                    throw new JMSException("Destination: " + destination + " 
still has an active subscription: " + sub);
+                    if(sub.isWildcard()) {
+                        var dest = destinations.get(destination);
+                        if(dest != null && 
dest.isGcWithOnlyWildcardConsumers()) {

Review Comment:
   Would this also need to look for the same for network-only subscribers?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 1001853)
    Time Spent: 2h 40m  (was: 2.5h)

> Support destination gc sweep of destinations with wild card consumers
> ---------------------------------------------------------------------
>
>                 Key: AMQ-9692
>                 URL: https://issues.apache.org/jira/browse/AMQ-9692
>             Project: ActiveMQ
>          Issue Type: Improvement
>            Reporter: Matt Pavlovich
>            Assignee: Matt Pavlovich
>            Priority: Minor
>             Fix For: 6.3.0, 5.19.2
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Currently, a wild-card consumer can hold up a destination from being 
> automatically garbage collected. This change would add a policyEntry setting 
> to allow garbage collection if the destination only has wild card consumers



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to