diff --git a/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java b/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java index ef26e54309..3bc48c5268 100755 --- a/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java +++ b/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java @@ -334,15 +334,19 @@ public class AdvisoryBroker extends BrokerFilter { } } - public void isFull(ConnectionContext context,Destination destination,Usage usage) { - super.isFull(context,destination, usage); - try { - ActiveMQTopic topic = AdvisorySupport.getFullAdvisoryTopic(destination.getActiveMQDestination()); - ActiveMQMessage advisoryMessage = new ActiveMQMessage(); - advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_USAGE_NAME, usage.getName()); - fireAdvisory(context, topic,null,null,advisoryMessage); - } catch (Exception e) { - LOG.warn("Failed to fire message is full advisory"); + public void isFull(ConnectionContext context, Destination destination, Usage usage) { + super.isFull(context, destination, usage); + if (AdvisorySupport.isAdvisoryTopic(destination.getActiveMQDestination()) == false) { + try { + + ActiveMQTopic topic = AdvisorySupport.getFullAdvisoryTopic(destination.getActiveMQDestination()); + ActiveMQMessage advisoryMessage = new ActiveMQMessage(); + advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_USAGE_NAME, usage.getName()); + fireAdvisory(context, topic, null, null, advisoryMessage); + + } catch (Exception e) { + LOG.warn("Failed to fire message is full advisory"); + } } }