NO-JIRA Adjust slow consumer example timing

This commit is contained in:
Justin Bertram 2018-03-06 11:31:25 -06:00 committed by Clebert Suconic
parent b638748ae3
commit e9991838c8
3 changed files with 4 additions and 7 deletions

View File

@ -34,12 +34,12 @@ import org.apache.activemq.artemis.api.core.ActiveMQObjectClosedException;
* *
* - sends messages to a queue "slow.consumer.kill". * - sends messages to a queue "slow.consumer.kill".
* - starts a consumer BUT does not consume any messages. * - 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. * - receive an exception as the connection should already be closed.
*/ */
public class KillSlowConsumerExample { 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 { 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) { if (!isNotified) {
throw new RuntimeException("SlowConsumerExample.demoSlowConsumerNotify() FAILED; timeout occurred before" + " - slow consumer notification was received. "); 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"> <address-setting match="slow.consumer.kill">
<slow-consumer-threshold>10</slow-consumer-threshold> <slow-consumer-threshold>10</slow-consumer-threshold>
<slow-consumer-policy>KILL</slow-consumer-policy> <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>
<address-setting match="slow.consumer.notify"> <address-setting match="slow.consumer.notify">
<slow-consumer-threshold>10</slow-consumer-threshold> <slow-consumer-threshold>10</slow-consumer-threshold>
<slow-consumer-policy>NOTIFY</slow-consumer-policy> <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-setting>
</address-settings> </address-settings>