This closes #1934
This commit is contained in:
commit
315c1e4c55
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -103,8 +103,6 @@ public class NotifySlowConsumerExample {
|
|||
if (!isNotified) {
|
||||
throw new RuntimeException("SlowConsumerExample.demoSlowConsumerNotify() FAILED; timeout occurred before" + " - slow consumer notification was received. ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue