You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2017/11/21 14:59:37 UTC

activemq git commit: [AMQ-6854] - periodic log warn on store limits reached in the same way

Repository: activemq
Updated Branches:
  refs/heads/master 08aa5118f -> 151e17abf


[AMQ-6854] - periodic log warn on store limits reached in the same way


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/151e17ab
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/151e17ab
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/151e17ab

Branch: refs/heads/master
Commit: 151e17abfed83e16734d9775e6862b1d1241282a
Parents: 08aa511
Author: gtully <ga...@gmail.com>
Authored: Tue Nov 21 14:56:02 2017 +0000
Committer: gtully <ga...@gmail.com>
Committed: Tue Nov 21 14:56:02 2017 +0000

----------------------------------------------------------------------
 .../apache/activemq/broker/region/BaseDestination.java  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/151e17ab/activemq-broker/src/main/java/org/apache/activemq/broker/region/BaseDestination.java
----------------------------------------------------------------------
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 aa2f7b5..672c5b9 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 {