activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r912496 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
Date Mon, 22 Feb 2010 07:05:05 GMT
Author: rajdavies
Date: Mon Feb 22 07:05:04 2010
New Revision: 912496

URL: http://svn.apache.org/viewvc?rev=912496&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-2533

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java?rev=912496&r1=912495&r2=912496&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisoryBroker.java
Mon Feb 22 07:05:04 2010
@@ -350,15 +350,19 @@
     }
     
     @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");
+            }
         }
     }
     



Mime
View raw message