From eb51a69c1f476cfa2e00ac290acaf1d3a77df46e Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Mon, 22 Feb 2010 07:05:04 +0000 Subject: [PATCH] Fix for https://issues.apache.org/activemq/browse/AMQ-2533 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@912496 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/advisory/AdvisoryBroker.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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 758a81e5d7..faef62d6fe 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 @@ -350,15 +350,19 @@ public class AdvisoryBroker extends BrokerFilter { } @Override - 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"); + } } }