This commit is contained in:
Clebert Suconic 2018-03-06 12:39:43 -05:00
commit 315c1e4c55
4 changed files with 7 additions and 7 deletions

View File

@ -17,6 +17,7 @@
package org.apache.activemq.artemis.core.server.impl;
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
@ -40,6 +41,8 @@ public class TransientQueueManagerImpl extends ReferenceCounterUtil implements T
try {
server.destroyQueue(queueName, null, false);
} catch (ActiveMQNonExistentQueueException e) {
// ignore
} catch (ActiveMQException e) {
ActiveMQServerLogger.LOGGER.errorOnDeletingQueue(queueName.toString(), e);
}

View File

@ -34,12 +34,12 @@ import org.apache.activemq.artemis.api.core.ActiveMQObjectClosedException;
*
* - sends messages to a queue "slow.consumer.kill".
* - starts a consumer BUT does not consume any messages.
* - waits for 8 seconds and tries to consume a message.
* - waits for 10 seconds and tries to consume a message.
* - receive an exception as the connection should already be closed.
*/
public class KillSlowConsumerExample {
public static final int WAIT_TIME = 7;
public static final int WAIT_TIME = 10;
public static void main(final String[] args) throws Exception {
@ -98,7 +98,6 @@ public class KillSlowConsumerExample {
}
}
}
}
}

View File

@ -103,8 +103,6 @@ public class NotifySlowConsumerExample {
if (!isNotified) {
throw new RuntimeException("SlowConsumerExample.demoSlowConsumerNotify() FAILED; timeout occurred before" + " - slow consumer notification was received. ");
}
}
}
}
}

View File

@ -52,13 +52,13 @@ under the License.
<address-setting match="slow.consumer.kill">
<slow-consumer-threshold>10</slow-consumer-threshold>
<slow-consumer-policy>KILL</slow-consumer-policy>
<slow-consumer-check-period>5</slow-consumer-check-period>
<slow-consumer-check-period>3</slow-consumer-check-period>
</address-setting>
<address-setting match="slow.consumer.notify">
<slow-consumer-threshold>10</slow-consumer-threshold>
<slow-consumer-policy>NOTIFY</slow-consumer-policy>
<slow-consumer-check-period>5</slow-consumer-check-period>
<slow-consumer-check-period>3</slow-consumer-check-period>
</address-setting>
</address-settings>