Examples of TopicMessageStore


Examples of org.apache.activemq.store.TopicMessageStore

        }
        return rc;
    }

    public synchronized TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException{
        TopicMessageStore rc=(TopicMessageStore)topics.get(destination);
        if(rc==null){
            Store store=getStore();
            ListContainer messageContainer=getListContainer(destination,"topic-data");
            MapContainer subsContainer=getMapContainer(destination.toString()+"-Subscriptions","topic-subs");
            ListContainer ackContainer=store.getListContainer(destination.toString(),"topic-acks");
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

        }
        return rc;
    }

    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
        TopicMessageStore rc = new JDBCTopicMessageStore(this, getAdapter(), wireFormat, destination);
        if (transactionStore != null) {
            rc = transactionStore.proxy(rc);
        }
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

    }

    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException {
        JournalTopicMessageStore store = (JournalTopicMessageStore) topics.get(destinationName);
        if (store == null) {
            TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName);
            store = new JournalTopicMessageStore(this, checkpointStore, destinationName);
            topics.put(destinationName, store);
        }
        return store;
    }
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

        }
        PersistenceAdapter adapter = ((DestinationFactoryImpl)destinationFactory).getPersistenceAdapter();
        final List result=new ArrayList();
        try{
            ActiveMQTopic topic=new ActiveMQTopic(view.getDestinationName());
            TopicMessageStore store=adapter.createTopicMessageStore(topic);
            store.recover(new MessageRecoveryListener(){
                public void recoverMessage(Message message) throws Exception{
                    result.add(message);
                }

                public void recoverMessageReference(String messageReference) throws Exception{}
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

        }
        return rc;
    }

    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
        TopicMessageStore rc = (TopicMessageStore)topics.get(destination);
        if(rc==null) {
            rc = new MemoryTopicMessageStore(destination);
            if( transactionStore !=null ) {
                rc = transactionStore.proxy(rc);
            }
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

    }

    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destinationName) throws IOException {
        QuickJournalTopicMessageStore store = (QuickJournalTopicMessageStore) topics.get(destinationName);
        if (store == null) {
            TopicMessageStore checkpointStore = longTermPersistence.createTopicMessageStore(destinationName);
            store = new QuickJournalTopicMessageStore(this, checkpointStore, destinationName);
            topics.put(destinationName, store);
        }
        return store;
    }
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

        }
        return rc;
    }

    public TopicMessageStore createTopicMessageStore(ActiveMQTopic destination) throws IOException {
        TopicMessageStore rc = new JDBCTopicMessageStore(this, getAdapter(), wireFormat, destination, audit);
        if (transactionStore != null) {
            rc = transactionStore.proxy(rc);
        }
        return rc;
    }
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

        }
        PersistenceAdapter adapter = ((DestinationFactoryImpl)destinationFactory).getPersistenceAdapter();
        final List<Message> result = new ArrayList<Message>();
        try {
            ActiveMQTopic topic = new ActiveMQTopic(view.getDestinationName());
            TopicMessageStore store = adapter.createTopicMessageStore(topic);
            store.recover(new MessageRecoveryListener() {
                public boolean recoverMessage(Message message) throws Exception {
                    result.add(message);
                    return true;
                }
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

       
        return topic;
    }

    private void recoverDurableSubscriptions(ConnectionContext context, Topic topic) throws IOException, JMSException, Exception {
        TopicMessageStore store = (TopicMessageStore) topic.getMessageStore();
        // Eagerly recover the durable subscriptions
        if (store != null) {           
            SubscriptionInfo[] infos = store.getAllSubscriptions();
            for (int i = 0; i < infos.length; i++) {
               
                SubscriptionInfo info = infos[i];
                log.debug("Restoring durable subscription: "+infos);
                SubscriptionKey key = new SubscriptionKey(info);
View Full Code Here

Examples of org.apache.activemq.store.TopicMessageStore

                    }
                    super.addSubscription(context, sub);
                };
            };
        } else {
            TopicMessageStore store = null;
            if (!AdvisorySupport.isAdvisoryTopic(destination)) {
                store = persistenceAdapter.createTopicMessageStore((ActiveMQTopic) destination);
            }
           
            Topic topic = new Topic(destination, store, memoryManager, destinationStatistics, taskRunnerFactory);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.