diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/BaseDestination.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/BaseDestination.java index aa2f7b52d6..672c5b947c 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/BaseDestination.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/BaseDestination.java @@ -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 {