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

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@422978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-07-18 05:56:19 +00:00
parent e0f168a58d
commit bc344c9627
1 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,12 @@ abstract public class AbstractRegion implements Region {
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