public class ProxyTopicMessageStore extends ProxyMessageStore implements TopicMessageStore
| Constructor and Description |
|---|
ProxyTopicMessageStore(TopicMessageStore delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(ConnectionContext context,
String clientId,
String subscriptionName,
MessageId messageId,
MessageAck ack)
Stores the last acknowledged messgeID for the given subscription so that
we can recover and commence dispatching messages from the last checkpoint
|
void |
addMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
void |
addMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
void |
addSubscription(SubscriptionInfo subscriptionInfo,
boolean retroactive)
Inserts the subscriber info due to a subscription change If this is
a new subscription and the retroactive is false, then the last message
sent to the topic should be set as the last message acknowledged by they
new subscription.
|
ListenableFuture<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddQueueMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message)
Adds a message to the message store
|
ListenableFuture<Object> |
asyncAddTopicMessage(ConnectionContext context,
Message message,
boolean canOptimizeHint)
Adds a message to the message store
|
void |
deleteSubscription(String clientId,
String subscriptionName) |
void |
dispose(ConnectionContext context) |
SubscriptionInfo[] |
getAllSubscriptions()
Lists all the durable subscriptions for a given destination.
|
MessageStore |
getDelegate() |
ActiveMQDestination |
getDestination()
The destination that the message store is holding messages for.
|
Message |
getMessage(MessageId identity)
Looks up a message using either the String messageID or the
messageNumber.
|
int |
getMessageCount() |
int |
getMessageCount(String clientId,
String subscriberName)
Get the number of messages ready to deliver from the store to a durable
subscriber
|
boolean |
isEmpty()
flag to indicate if the store is empty
|
boolean |
isPrioritizedMessages() |
SubscriptionInfo |
lookupSubscription(String clientId,
String subscriptionName)
Finds the subscriber entry for the given consumer info
|
void |
recover(MessageRecoveryListener listener)
Recover any messages to be delivered.
|
void |
recoverNextMessages(int maxReturned,
MessageRecoveryListener listener) |
void |
recoverNextMessages(String clientId,
String subscriptionName,
int maxReturned,
MessageRecoveryListener listener)
For an active subscription - retrieve messages from the store for the
subscriber after the lastMessageId messageId
|
void |
recoverSubscription(String clientId,
String subscriptionName,
MessageRecoveryListener listener)
For the new subscription find the last acknowledged message ID and then
find any new messages since then and dispatch them to the subscription.
|
void |
registerIndexListener(IndexListener indexListener) |
void |
removeAllMessages(ConnectionContext context)
Removes all the messages from the message store.
|
void |
removeAsyncMessage(ConnectionContext context,
MessageAck ack) |
void |
removeMessage(ConnectionContext context,
MessageAck ack)
Removes a message from the message store.
|
void |
resetBatching()
A hint to the Store to reset any batching state for the Destination
|
void |
resetBatching(String clientId,
String subscriptionName)
A hint to the Store to reset any batching state for a durable subscriber
|
void |
setBatch(MessageId messageId)
allow caching cursors to set the current batch offset when cache is exhausted
|
void |
setMemoryUsage(MemoryUsage memoryUsage) |
void |
setPrioritizedMessages(boolean prioritizedMessages)
A hint to the store to try recover messages according to priority
|
void |
start() |
void |
stop() |
void |
updateMessage(Message message) |
toStringpublic ProxyTopicMessageStore(TopicMessageStore delegate)
public MessageStore getDelegate()
getDelegate in class ProxyMessageStorepublic void addMessage(ConnectionContext context, Message message) throws IOException
MessageStoreaddMessage in interface MessageStoreaddMessage in class ProxyMessageStorecontext - contextIOExceptionpublic void addMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
MessageStoreaddMessage in interface MessageStoreaddMessage in class ProxyMessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the diskIOExceptionpublic Message getMessage(MessageId identity) throws IOException
MessageStoregetMessage in interface MessageStoregetMessage in class ProxyMessageStoreidentity - which contains either the messageID or the messageNumberIOExceptionpublic void recover(MessageRecoveryListener listener) throws Exception
MessageStorerecover in interface MessageStorerecover in class ProxyMessageStoreExceptionpublic void removeAllMessages(ConnectionContext context) throws IOException
MessageStoreremoveAllMessages in interface MessageStoreremoveAllMessages in class ProxyMessageStoreIOExceptionpublic void removeMessage(ConnectionContext context, MessageAck ack) throws IOException
MessageStoreremoveMessage in interface MessageStoreremoveMessage in class ProxyMessageStoreack - the ack request that cause the message to be removed. It
conatins the identity which contains the messageID of the
message that needs to be removed.IOExceptionpublic void start() throws Exception
start in interface Servicestart in class ProxyMessageStoreExceptionpublic void stop() throws Exception
stop in interface Servicestop in class ProxyMessageStoreExceptionpublic SubscriptionInfo lookupSubscription(String clientId, String subscriptionName) throws IOException
TopicMessageStorelookupSubscription in interface TopicMessageStoreIOExceptionpublic void acknowledge(ConnectionContext context, String clientId, String subscriptionName, MessageId messageId, MessageAck ack) throws IOException
TopicMessageStoreacknowledge in interface TopicMessageStoreIOExceptionpublic void addSubscription(SubscriptionInfo subscriptionInfo, boolean retroactive) throws IOException
TopicMessageStoreaddSubscription in interface TopicMessageStoreIOExceptionpublic void deleteSubscription(String clientId, String subscriptionName) throws IOException
deleteSubscription in interface TopicMessageStoreIOExceptionpublic void recoverSubscription(String clientId, String subscriptionName, MessageRecoveryListener listener) throws Exception
TopicMessageStorerecoverSubscription in interface TopicMessageStoreExceptionpublic void recoverNextMessages(String clientId, String subscriptionName, int maxReturned, MessageRecoveryListener listener) throws Exception
TopicMessageStorerecoverNextMessages in interface TopicMessageStoreExceptionpublic void resetBatching(String clientId, String subscriptionName)
TopicMessageStoreresetBatching in interface TopicMessageStorepublic ActiveMQDestination getDestination()
MessageStoregetDestination in interface MessageStoregetDestination in class ProxyMessageStorepublic SubscriptionInfo[] getAllSubscriptions() throws IOException
TopicMessageStoregetAllSubscriptions in interface TopicMessageStoreIOExceptionpublic void setMemoryUsage(MemoryUsage memoryUsage)
setMemoryUsage in interface MessageStoresetMemoryUsage in class ProxyMessageStorememoryUsage - The SystemUsage that is controlling the
destination's memory usage.public int getMessageCount(String clientId, String subscriberName) throws IOException
TopicMessageStoregetMessageCount in interface TopicMessageStoreIOExceptionpublic int getMessageCount() throws IOException
getMessageCount in interface MessageStoregetMessageCount in class ProxyMessageStoreIOExceptionpublic void recoverNextMessages(int maxReturned, MessageRecoveryListener listener) throws Exception
recoverNextMessages in interface MessageStorerecoverNextMessages in class ProxyMessageStoreExceptionpublic void dispose(ConnectionContext context)
dispose in interface MessageStoredispose in class ProxyMessageStorepublic void resetBatching()
MessageStoreresetBatching in interface MessageStoreresetBatching in class ProxyMessageStorepublic void setBatch(MessageId messageId) throws Exception
MessageStoresetBatch in interface MessageStoresetBatch in class ProxyMessageStoreExceptionpublic boolean isEmpty() throws Exception
MessageStoreisEmpty in interface MessageStoreisEmpty in class ProxyMessageStoreExceptionpublic ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message) throws IOException
MessageStoreasyncAddTopicMessage in interface MessageStoreasyncAddTopicMessage in class ProxyMessageStorecontext - contextIOExceptionpublic ListenableFuture<Object> asyncAddTopicMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
MessageStoreasyncAddTopicMessage in interface MessageStoreasyncAddTopicMessage in class ProxyMessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the diskIOExceptionpublic ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message) throws IOException
MessageStoreasyncAddQueueMessage in interface MessageStoreasyncAddQueueMessage in class ProxyMessageStorecontext - contextIOExceptionpublic ListenableFuture<Object> asyncAddQueueMessage(ConnectionContext context, Message message, boolean canOptimizeHint) throws IOException
MessageStoreasyncAddQueueMessage in interface MessageStoreasyncAddQueueMessage in class ProxyMessageStorecontext - contextcanOptimizeHint - - give a hint to the store that the message may be consumed before it hits the diskIOExceptionpublic void removeAsyncMessage(ConnectionContext context, MessageAck ack) throws IOException
removeAsyncMessage in interface MessageStoreremoveAsyncMessage in class ProxyMessageStoreIOExceptionpublic void setPrioritizedMessages(boolean prioritizedMessages)
MessageStoresetPrioritizedMessages in interface MessageStoresetPrioritizedMessages in class ProxyMessageStorepublic boolean isPrioritizedMessages()
isPrioritizedMessages in interface MessageStoreisPrioritizedMessages in class ProxyMessageStorepublic void updateMessage(Message message) throws IOException
updateMessage in interface MessageStoreupdateMessage in class ProxyMessageStoreIOExceptionpublic void registerIndexListener(IndexListener indexListener)
registerIndexListener in interface MessageStoreregisterIndexListener in class ProxyMessageStoreCopyright © 2005–2021 FuseSource, Corp.. All rights reserved.