activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r422978 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
Date Tue, 18 Jul 2006 05:56:20 GMT
Author: jstrachan
Date: Mon Jul 17 22:56:19 2006
New Revision: 422978

URL: http://svn.apache.org/viewvc?rev=422978&view=rev
Log:
auto-create destinations when consumers are added to the broker (assuming auto-create is enabled)
to help implement Virtual Topics.. For more background see: http://www.nabble.com/Re%3A-Virtual-Topics-%28was-Re%3A-Failover-topic-subscribers%29-tf1942508.html#a5332644

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java?rev=422978&r1=422977&r2=422978&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java
Mon Jul 17 22:56:19 2006
@@ -154,6 +154,12 @@
     public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws
Exception {
         log.debug("Adding consumer: "+info.getConsumerId());
 
+        ActiveMQDestination destination = info.getDestination();
+        if (destination != null && ! destination.isPattern() && ! destination.isComposite())
{
+            // lets auto-create the destination
+            lookup(context, destination);
+        }
+        
         Subscription sub = createSubscription(context, info);
 
         // We may need to add some destinations that are in persistent store but not active




Mime
View raw message