Package org.apache.activemq.store

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


    }

    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

        }
        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

        }
        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

    }

    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

        }
        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

        }
        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

       
        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

                    }
                    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

        }
        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

TOP

Related Classes of org.apache.activemq.store.TopicMessageStore

Copyright © 2018 www.massapicom. 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.