Class JournalTopicMessageStore
- java.lang.Object
-
- org.apache.activemq.store.AbstractMessageStore
-
- org.apache.activemq.store.journal.JournalMessageStore
-
- org.apache.activemq.store.journal.JournalTopicMessageStore
-
- All Implemented Interfaces:
org.apache.activemq.Service,MessageStore,TopicMessageStore
public class JournalTopicMessageStore extends JournalMessageStore implements TopicMessageStore
A MessageStore that uses a Journal to store it's messages.
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.store.journal.JournalMessageStore
inFlightTxLocations, lastLocation, peristenceAdapter, transactionStore, transactionTemplate
-
Fields inherited from class org.apache.activemq.store.AbstractMessageStore
destination, FUTURE, indexListener, messageStoreStatistics, prioritizedMessages
-
-
Constructor Summary
Constructors Constructor Description JournalTopicMessageStore(JournalPersistenceAdapter adapter, TopicMessageStore checkpointStore, org.apache.activemq.command.ActiveMQTopic destinationName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacknowledge(ConnectionContext context, String clientId, String subscriptionName, org.apache.activemq.command.MessageId messageId, org.apache.activemq.command.MessageAck originalAck)protected voidacknowledge(org.apache.activemq.command.MessageId messageId, org.apache.activeio.journal.RecordLocation location, SubscriptionKey key)voidaddMessage(ConnectionContext context, org.apache.activemq.command.Message message)Not synchronized since the Journal has better throughput if you increase the number of concurrent writes that it is doing.voidaddSubscription(org.apache.activemq.command.SubscriptionInfo subscriptionInfo, boolean retroactive)org.apache.activeio.journal.RecordLocationcheckpoint()voiddeleteSubscription(String clientId, String subscriptionName)org.apache.activemq.command.SubscriptionInfo[]getAllSubscriptions()TopicMessageStoregetLongTermTopicMessageStore()intgetMessageCount(String clientId, String subscriberName)longgetMessageSize(String clientId, String subscriberName)MessageStoreSubscriptionStatisticsgetMessageStoreSubStatistics()org.apache.activemq.command.SubscriptionInfolookupSubscription(String clientId, String subscriptionName)voidrecoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener)voidrecoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener)voidreplayAcknowledge(ConnectionContext context, String clientId, String subscritionName, org.apache.activemq.command.MessageId messageId)voidresetBatching(String clientId, String subscriptionName)-
Methods inherited from class org.apache.activemq.store.journal.JournalMessageStore
addMessageReference, checkpoint, getLongTermMessageStore, getMessage, getMessageCount, getMessageReference, getMessageSize, recover, recoverNextMessages, removeAllMessages, removeMessage, replayAddMessage, replayRemoveMessage, resetBatching, setBatch, setMemoryUsage, start, stop
-
Methods inherited from class org.apache.activemq.store.AbstractMessageStore
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getIndexListener, getMessageStoreStatistics, isEmpty, isPrioritizedMessages, recoverMessageStoreStatistics, registerIndexListener, removeAsyncMessage, setPrioritizedMessages, updateMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.store.MessageStore
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getMessage, getMessageCount, getMessageSize, getMessageStoreStatistics, isEmpty, isPrioritizedMessages, recover, recoverNextMessages, registerIndexListener, removeAllMessages, removeAsyncMessage, removeMessage, resetBatching, setBatch, setMemoryUsage, setPrioritizedMessages, updateMessage
-
-
-
-
Constructor Detail
-
JournalTopicMessageStore
public JournalTopicMessageStore(JournalPersistenceAdapter adapter, TopicMessageStore checkpointStore, org.apache.activemq.command.ActiveMQTopic destinationName)
-
-
Method Detail
-
recoverSubscription
public void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception
- Specified by:
recoverSubscriptionin interfaceTopicMessageStore- Throws:
Exception
-
recoverNextMessages
public void recoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener) throws Exception
- Specified by:
recoverNextMessagesin interfaceTopicMessageStore- Throws:
Exception
-
lookupSubscription
public org.apache.activemq.command.SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException
- Specified by:
lookupSubscriptionin interfaceTopicMessageStore- Throws:
IOException
-
addSubscription
public void addSubscription(org.apache.activemq.command.SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException
- Specified by:
addSubscriptionin interfaceTopicMessageStore- Throws:
IOException
-
addMessage
public void addMessage(ConnectionContext context, org.apache.activemq.command.Message message) throws IOException
Description copied from class:JournalMessageStoreNot synchronized since the Journal has better throughput if you increase the number of concurrent writes that it is doing.- Specified by:
addMessagein interfaceMessageStore- Overrides:
addMessagein classJournalMessageStore- Throws:
IOException
-
acknowledge
public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, org.apache.activemq.command.MessageId messageId, org.apache.activemq.command.MessageAck originalAck) throws IOException
- Specified by:
acknowledgein interfaceTopicMessageStore- Throws:
IOException
-
replayAcknowledge
public void replayAcknowledge(ConnectionContext context, String clientId, String subscritionName, org.apache.activemq.command.MessageId messageId)
-
acknowledge
protected void acknowledge(org.apache.activemq.command.MessageId messageId, org.apache.activeio.journal.RecordLocation location, SubscriptionKey key)
- Parameters:
messageId-location-key-
-
checkpoint
public org.apache.activeio.journal.RecordLocation checkpoint() throws IOException
- Overrides:
checkpointin classJournalMessageStore- Returns:
- Throws:
IOException
-
getLongTermTopicMessageStore
public TopicMessageStore getLongTermTopicMessageStore()
- Returns:
- Returns the longTermStore.
-
deleteSubscription
public void deleteSubscription(String clientId, String subscriptionName) throws IOException
- Specified by:
deleteSubscriptionin interfaceTopicMessageStore- Throws:
IOException
-
getAllSubscriptions
public org.apache.activemq.command.SubscriptionInfo[] getAllSubscriptions() throws IOException
- Specified by:
getAllSubscriptionsin interfaceTopicMessageStore- Throws:
IOException
-
getMessageCount
public int getMessageCount(String clientId, String subscriberName) throws IOException
- Specified by:
getMessageCountin interfaceTopicMessageStore- Throws:
IOException
-
getMessageSize
public long getMessageSize(String clientId, String subscriberName) throws IOException
- Specified by:
getMessageSizein interfaceTopicMessageStore- Throws:
IOException
-
resetBatching
public void resetBatching(String clientId, String subscriptionName)
- Specified by:
resetBatchingin interfaceTopicMessageStore
-
getMessageStoreSubStatistics
public MessageStoreSubscriptionStatistics getMessageStoreSubStatistics()
- Specified by:
getMessageStoreSubStatisticsin interfaceTopicMessageStore
-
-