NO-JIRA Adjust slow consumer example timing
This commit is contained in:
parent
b638748ae3
commit
e9991838c8
|
@ -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