Interface Destination
- All Superinterfaces:
org.apache.activemq.command.Message.MessageDestination,org.apache.activemq.Service,org.apache.activemq.thread.Task
- All Known Implementing Classes:
AuthorizationDestinationFilter,BaseDestination,BaseVirtualDestinationFilter,CompositeDestinationFilter,DestinationFilter,MappedQueueFilter,Queue,SelectorAwareVirtualTopicInterceptor,TempQueue,TempTopic,Topic,VirtualTopicInterceptor
public interface Destination
extends org.apache.activemq.Service, org.apache.activemq.thread.Task, org.apache.activemq.command.Message.MessageDestination
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(ConnectionContext context, Subscription sub, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference node) voidaddProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) voidaddSubscription(ConnectionContext context, Subscription sub) org.apache.activemq.command.Message[]browse()booleancanGC()voidclearPendingMessages(int pendingAdditionsCount) voiddispose(ConnectionContext context) voidduplicateFromStore(org.apache.activemq.command.Message message, Subscription subscription) voidfastProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo producerInfo) Called to notify a producer is too fastvoidgc()org.apache.activemq.command.ActiveMQDestinationlongintlongintintintintorg.apache.activemq.usage.MemoryUsageintgetName()booleanisActive()booleanbooleanbooleanbooleanvoidisFull(ConnectionContext context, org.apache.activemq.usage.Usage<?> usage) Called when a Usage reaches a limitbooleanbooleanbooleanbooleanbooleanvoidmarkForGC(long timeStamp) voidmessageConsumed(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference) called when message is consumedvoidmessageDelivered(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference) Called when message is delivered to the brokervoidmessageDiscarded(ConnectionContext context, Subscription sub, org.apache.activemq.broker.region.MessageReference messageReference) Called when a message is discarded - e.g. running low on memory This will happen only if the policy is enabled - e.g. non durable topicsvoidmessageDispatched(ConnectionContext context, Subscription sub, org.apache.activemq.broker.region.MessageReference messageReference) Called when message is dispatched to a consumervoidmessageExpired(ConnectionContext context, Subscription subs, org.apache.activemq.broker.region.MessageReference node) Inform the Destination a message has expiredvoidprocessDispatchNotification(org.apache.activemq.command.MessageDispatchNotification messageDispatchNotification) called on Queues in slave mode to allow dispatch to follow subscription choice of mastervoidremoveProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) voidremoveSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) voidsend(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) voidsetAlwaysRetroactive(boolean value) voidsetBlockedProducerWarningInterval(long blockedProducerWarningInterval) Set's the interval at which warnings about producers being blocked by resource usage will be triggered.voidsetCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) voidsetDoOptimzeMessageStorage(boolean doOptimzeMessageStorage) voidsetEnableAudit(boolean enableAudit) voidsetLazyDispatch(boolean value) set the lazy dispatch - default is falsevoidsetMaxAuditDepth(int maxAuditDepth) voidsetMaxBrowsePageSize(int maxPageSize) voidsetMaxPageSize(int maxPageSize) voidsetMaxProducersToAudit(int maxProducersToAudit) voidsetMemoryUsage(org.apache.activemq.usage.MemoryUsage memoryUsage) voidsetMinimumMessageSize(int minimumMessageSize) voidsetProducerFlowControl(boolean value) voidsetSendDuplicateFromStoreToDLQ(boolean sendDuplicateFromStoreToDLQ) voidsetUseCache(boolean useCache) voidslowConsumer(ConnectionContext context, Subscription subs) Called when there is a slow consumervoidwakeup()optionally called by a Subscriber - to inform the Destination its ready for more messagesMethods inherited from interface org.apache.activemq.Service
start, stopMethods inherited from interface org.apache.activemq.thread.Task
iterate
-
Field Details
-
DEFAULT_DEAD_LETTER_STRATEGY
-
DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL
static final long DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL- See Also:
-
-
Method Details
-
addSubscription
- Throws:
Exception
-
removeSubscription
void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception - Throws:
Exception
-
addProducer
void addProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception - Throws:
Exception
-
removeProducer
void removeProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception - Throws:
Exception
-
send
void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message messageSend) throws Exception - Throws:
Exception
-
acknowledge
void acknowledge(ConnectionContext context, Subscription sub, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference node) throws IOException - Throws:
IOException
-
getInactiveTimeoutBeforeGC
long getInactiveTimeoutBeforeGC() -
markForGC
void markForGC(long timeStamp) -
canGC
boolean canGC() -
gc
void gc() -
getActiveMQDestination
org.apache.activemq.command.ActiveMQDestination getActiveMQDestination() -
getMemoryUsage
org.apache.activemq.usage.MemoryUsage getMemoryUsage()- Specified by:
getMemoryUsagein interfaceorg.apache.activemq.command.Message.MessageDestination
-
setMemoryUsage
void setMemoryUsage(org.apache.activemq.usage.MemoryUsage memoryUsage) -
getTempUsage
TempUsage getTempUsage() -
dispose
- Throws:
IOException
-
isDisposed
boolean isDisposed() -
getDestinationStatistics
DestinationStatistics getDestinationStatistics() -
getDeadLetterStrategy
DeadLetterStrategy getDeadLetterStrategy() -
browse
org.apache.activemq.command.Message[] browse() -
getName
String getName() -
getMessageStore
MessageStore getMessageStore() -
isProducerFlowControl
boolean isProducerFlowControl() -
setProducerFlowControl
void setProducerFlowControl(boolean value) -
isAlwaysRetroactive
boolean isAlwaysRetroactive() -
setAlwaysRetroactive
void setAlwaysRetroactive(boolean value) -
setBlockedProducerWarningInterval
void setBlockedProducerWarningInterval(long blockedProducerWarningInterval) Set's the interval at which warnings about producers being blocked by resource usage will be triggered. Values of 0 or less will disable warnings- Parameters:
blockedProducerWarningInterval- the interval at which warning about blocked producers will be triggered.
-
getBlockedProducerWarningInterval
long getBlockedProducerWarningInterval()- Returns:
- the interval at which warning about blocked producers will be triggered.
-
getMaxProducersToAudit
int getMaxProducersToAudit() -
setMaxProducersToAudit
void setMaxProducersToAudit(int maxProducersToAudit) -
getMaxAuditDepth
int getMaxAuditDepth() -
setMaxAuditDepth
void setMaxAuditDepth(int maxAuditDepth) -
isEnableAudit
boolean isEnableAudit() -
setEnableAudit
void setEnableAudit(boolean enableAudit) -
isActive
boolean isActive() -
getMaxPageSize
int getMaxPageSize() -
setMaxPageSize
void setMaxPageSize(int maxPageSize) -
getMaxBrowsePageSize
int getMaxBrowsePageSize() -
setMaxBrowsePageSize
void setMaxBrowsePageSize(int maxPageSize) -
isUseCache
boolean isUseCache() -
setUseCache
void setUseCache(boolean useCache) -
getMinimumMessageSize
int getMinimumMessageSize()- Specified by:
getMinimumMessageSizein interfaceorg.apache.activemq.command.Message.MessageDestination
-
setMinimumMessageSize
void setMinimumMessageSize(int minimumMessageSize) -
getCursorMemoryHighWaterMark
int getCursorMemoryHighWaterMark() -
setCursorMemoryHighWaterMark
void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) -
wakeup
void wakeup()optionally called by a Subscriber - to inform the Destination its ready for more messages -
isLazyDispatch
boolean isLazyDispatch()- Returns:
- true if lazyDispatch is enabled
-
setLazyDispatch
void setLazyDispatch(boolean value) set the lazy dispatch - default is false- Parameters:
value-
-
messageExpired
void messageExpired(ConnectionContext context, Subscription subs, org.apache.activemq.broker.region.MessageReference node) Inform the Destination a message has expired- Parameters:
context-subs-node-
-
messageConsumed
void messageConsumed(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference) called when message is consumed- Parameters:
context-messageReference-
-
messageDelivered
void messageDelivered(ConnectionContext context, org.apache.activemq.broker.region.MessageReference messageReference) Called when message is delivered to the broker- Parameters:
context-messageReference-
-
messageDispatched
void messageDispatched(ConnectionContext context, Subscription sub, org.apache.activemq.broker.region.MessageReference messageReference) Called when message is dispatched to a consumer- Parameters:
context-sub-messageReference-
-
messageDiscarded
void messageDiscarded(ConnectionContext context, Subscription sub, org.apache.activemq.broker.region.MessageReference messageReference) Called when a message is discarded - e.g. running low on memory This will happen only if the policy is enabled - e.g. non durable topics- Parameters:
context-messageReference-sub-
-
slowConsumer
Called when there is a slow consumer- Parameters:
context-subs-
-
fastProducer
Called to notify a producer is too fast- Parameters:
context-producerInfo-
-
isFull
Called when a Usage reaches a limit- Parameters:
context-usage-
-
getConsumers
List<Subscription> getConsumers() -
processDispatchNotification
void processDispatchNotification(org.apache.activemq.command.MessageDispatchNotification messageDispatchNotification) throws Exception called on Queues in slave mode to allow dispatch to follow subscription choice of master- Parameters:
messageDispatchNotification-- Throws:
Exception
-
isPrioritizedMessages
boolean isPrioritizedMessages() -
getSlowConsumerStrategy
SlowConsumerStrategy getSlowConsumerStrategy() -
isDoOptimzeMessageStorage
boolean isDoOptimzeMessageStorage() -
setDoOptimzeMessageStorage
void setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage) -
clearPendingMessages
void clearPendingMessages(int pendingAdditionsCount) -
duplicateFromStore
-
isSendDuplicateFromStoreToDLQ
boolean isSendDuplicateFromStoreToDLQ() -
setSendDuplicateFromStoreToDLQ
void setSendDuplicateFromStoreToDLQ(boolean sendDuplicateFromStoreToDLQ)
-