mirror of https://github.com/apache/activemq.git
[AMQ-6854] - periodic log warn on store limits reached in the same way
This commit is contained in:
parent
08aa5118ff
commit
151e17abfe
|
@ -673,12 +673,20 @@ public abstract class BaseDestination implements Destination {
|
|||
|
||||
protected final void waitForSpace(ConnectionContext context, ProducerBrokerExchange producerBrokerExchange, Usage<?> usage, int highWaterMark, String warning) throws IOException, InterruptedException, ResourceAllocationException {
|
||||
if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) {
|
||||
getLog().debug("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning);
|
||||
if (isFlowControlLogRequired()) {
|
||||
getLog().info("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning);
|
||||
} else {
|
||||
getLog().debug("sendFailIfNoSpace, forcing exception on send, usage: {}: {}", usage, warning);
|
||||
}
|
||||
throw new ResourceAllocationException(warning);
|
||||
}
|
||||
if (!context.isNetworkConnection() && systemUsage.getSendFailIfNoSpaceAfterTimeout() != 0) {
|
||||
if (!usage.waitForSpace(systemUsage.getSendFailIfNoSpaceAfterTimeout(), highWaterMark)) {
|
||||
getLog().debug("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send, usage: {}: {}", usage, warning);
|
||||
if (isFlowControlLogRequired()) {
|
||||
getLog().info("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send, usage: {}: {}", usage, warning);
|
||||
} else {
|
||||
getLog().debug("sendFailIfNoSpaceAfterTimeout expired, forcing exception on send, usage: {}: {}", usage, warning);
|
||||
}
|
||||
throw new ResourceAllocationException(warning);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue