Package org.apache.activemq.store.jdbc
Class JDBCTopicMessageStore
- java.lang.Object
-
- org.apache.activemq.store.AbstractMessageStore
-
- org.apache.activemq.store.jdbc.JDBCMessageStore
-
- org.apache.activemq.store.jdbc.JDBCTopicMessageStore
-
- All Implemented Interfaces:
org.apache.activemq.Service,MessageStore,TopicMessageStore
public class JDBCTopicMessageStore extends JDBCMessageStore implements TopicMessageStore
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_SEQUENCE_ID_CACHE_SIZE-
Fields inherited from class org.apache.activemq.store.jdbc.JDBCMessageStore
adapter, audit, pendingAdditions, persistenceAdapter, rolledBackAcks, wireFormat
-
Fields inherited from class org.apache.activemq.store.AbstractMessageStore
destination, FUTURE, indexListener, messageStoreStatistics, prioritizedMessages
-
-
Constructor Summary
Constructors Constructor Description JDBCTopicMessageStore(JDBCPersistenceAdapter persistenceAdapter, JDBCAdapter adapter, org.apache.activemq.wireformat.WireFormat wireFormat, org.apache.activemq.command.ActiveMQTopic topic, org.apache.activemq.ActiveMQMessageAudit audit)
-
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 ack)voidaddSubscription(org.apache.activemq.command.SubscriptionInfo subscriptionInfo, boolean retroactive)voidcomplete(String clientId, String subscriptionName)voiddeleteSubscription(String clientId, String subscriptionName)org.apache.activemq.command.SubscriptionInfo[]getAllSubscriptions()long[]getCachedStoreSequenceId(TransactionContext transactionContext, org.apache.activemq.command.ActiveMQDestination destination, org.apache.activemq.command.MessageId messageId)intgetMessageCount(String clientId, String subscriberName)longgetMessageSize(String clientId, String subscriberName)MessageStoreSubscriptionStatisticsgetMessageStoreSubStatistics()protected StringgetSubscriptionKey(String clientId, String subscriberName)org.apache.activemq.command.SubscriptionInfolookupSubscription(String clientId, String subscriptionName)protected voidonAdd(org.apache.activemq.command.Message message, long sequenceId, byte priority)voidpendingCompletion(String clientId, String subscriptionName, long sequenceId, byte priority)voidrecoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener)voidrecoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener)voidresetBatching(String clientId, String subscriptionName)-
Methods inherited from class org.apache.activemq.store.jdbc.JDBCMessageStore
addMessage, addMessageReference, getMessage, getMessageCount, getMessageReference, recover, recoverNextMessages, removeAllMessages, removeMessage, resetBatching, setBatch, setPrioritizedMessages, toString, trackRollbackAck, updateMessage
-
Methods inherited from class org.apache.activemq.store.AbstractMessageStore
addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getIndexListener, getMessageSize, getMessageStoreStatistics, isEmpty, isPrioritizedMessages, recoverMessageStoreStatistics, registerIndexListener, removeAsyncMessage, setMemoryUsage, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.store.MessageStore
addMessage, addMessage, asyncAddQueueMessage, asyncAddQueueMessage, asyncAddTopicMessage, asyncAddTopicMessage, dispose, getDestination, getMessage, getMessageCount, getMessageSize, getMessageStoreStatistics, isEmpty, isPrioritizedMessages, recover, recoverNextMessages, registerIndexListener, removeAllMessages, removeAsyncMessage, removeMessage, resetBatching, setBatch, setMemoryUsage, setPrioritizedMessages, updateMessage
-
-
-
-
Field Detail
-
PROPERTY_SEQUENCE_ID_CACHE_SIZE
public static final String PROPERTY_SEQUENCE_ID_CACHE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JDBCTopicMessageStore
public JDBCTopicMessageStore(JDBCPersistenceAdapter persistenceAdapter, JDBCAdapter adapter, org.apache.activemq.wireformat.WireFormat wireFormat, org.apache.activemq.command.ActiveMQTopic topic, org.apache.activemq.ActiveMQMessageAudit audit) throws IOException
- Throws:
IOException
-
-
Method Detail
-
acknowledge
public void acknowledge(ConnectionContext context, String clientId, String subscriptionName, org.apache.activemq.command.MessageId messageId, org.apache.activemq.command.MessageAck ack) throws IOException
- Specified by:
acknowledgein interfaceTopicMessageStore- Throws:
IOException
-
getCachedStoreSequenceId
public long[] getCachedStoreSequenceId(TransactionContext transactionContext, org.apache.activemq.command.ActiveMQDestination destination, org.apache.activemq.command.MessageId messageId) throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
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
-
resetBatching
public void resetBatching(String clientId, String subscriptionName)
- Specified by:
resetBatchingin interfaceTopicMessageStore
-
pendingCompletion
public void pendingCompletion(String clientId, String subscriptionName, long sequenceId, byte priority)
-
onAdd
protected void onAdd(org.apache.activemq.command.Message message, long sequenceId, byte priority)- Overrides:
onAddin classJDBCMessageStore
-
addSubscription
public void addSubscription(org.apache.activemq.command.SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException- Specified by:
addSubscriptionin interfaceTopicMessageStore- Throws:
IOException
-
lookupSubscription
public org.apache.activemq.command.SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException
- Specified by:
lookupSubscriptionin interfaceTopicMessageStore- Throws:
IOException- See Also:
TopicMessageStore.lookupSubscription(String, String)
-
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
-
getMessageStoreSubStatistics
public MessageStoreSubscriptionStatistics getMessageStoreSubStatistics()
- Specified by:
getMessageStoreSubStatisticsin interfaceTopicMessageStore
-
-