public class Topic extends BaseDestination implements org.apache.activemq.thread.Task
| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList<Subscription> |
consumers |
protected static Logger |
LOG |
blockedProducerWarningInterval, broker, brokerService, cursorMemoryHighWaterMark, deadLetterStrategy, DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC, destination, destinationStatistics, EXPIRE_MESSAGE_PERIOD, expireMessagesPeriod, lastBlockedProducerWarnTime, MAX_AUDIT_DEPTH, MAX_BROWSE_PAGE_SIZE, MAX_PAGE_SIZE, MAX_PRODUCERS_TO_AUDIT, memoryUsage, regionBroker, scheduler, started, store, storeUsageHighWaterMark, systemUsageDEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL, DEFAULT_DEAD_LETTER_STRATEGY| Constructor and Description |
|---|
Topic(BrokerService brokerService,
org.apache.activemq.command.ActiveMQDestination destination,
TopicMessageStore store,
DestinationStatistics parentStats,
org.apache.activemq.thread.TaskRunnerFactory taskFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(ConnectionContext context,
Subscription sub,
org.apache.activemq.command.MessageAck ack,
org.apache.activemq.broker.region.MessageReference node) |
void |
activate(ConnectionContext context,
DurableTopicSubscription subscription) |
void |
addSubscription(ConnectionContext context,
Subscription sub) |
org.apache.activemq.command.Message[] |
browse() |
void |
clearPendingMessages()
force a reread of the store - after transaction recovery completion
|
void |
deactivate(ConnectionContext context,
DurableTopicSubscription sub,
List<org.apache.activemq.broker.region.MessageReference> dispatched) |
void |
deleteSubscription(ConnectionContext context,
SubscriptionKey key) |
protected void |
dispatch(ConnectionContext context,
org.apache.activemq.command.Message message) |
void |
gc() |
List<Subscription> |
getConsumers() |
DispatchPolicy |
getDispatchPolicy() |
Map<SubscriptionKey,DurableTopicSubscription> |
getDurableTopicSubs() |
protected Logger |
getLog() |
SubscriptionRecoveryPolicy |
getSubscriptionRecoveryPolicy() |
void |
initialize()
initialize the destination
|
protected boolean |
isOptimizeStorage() |
boolean |
iterate() |
org.apache.activemq.command.Message |
loadMessage(org.apache.activemq.command.MessageId messageId) |
boolean |
lock(org.apache.activemq.broker.region.MessageReference node,
LockOwner sub) |
void |
messageExpired(ConnectionContext context,
Subscription subs,
org.apache.activemq.broker.region.MessageReference reference)
Inform the Destination a message has expired
|
void |
recoverRetroactiveMessages(ConnectionContext context,
Subscription subscription) |
void |
removeSubscription(ConnectionContext context,
Subscription sub,
long lastDeliveredSequenceId) |
void |
send(ProducerBrokerExchange producerExchange,
org.apache.activemq.command.Message message) |
void |
setDispatchPolicy(DispatchPolicy dispatchPolicy) |
void |
setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy recoveryPolicy) |
void |
start() |
void |
stop() |
String |
toString() |
void |
wakeup()
optionally called by a Subscriber - to inform the Destination its ready
for more messages
|
addProducer, canGC, convertToNonRangedAck, createConnectionContext, dispose, duplicateFromStore, fastProducer, getActiveMQDestination, getBlockedProducerWarningInterval, getCursorMemoryHighWaterMark, getDeadLetterStrategy, getDestinationSequenceId, getDestinationStatistics, getExpireMessagesPeriod, getInactiveTimeoutBeforeGC, getMaxAuditDepth, getMaxBrowsePageSize, getMaxExpirePageSize, getMaxPageSize, getMaxProducersToAudit, getMemoryUsage, getMessageStore, getMinimumMessageSize, getName, getOptimizeMessageStoreInFlightLimit, getSlowConsumerStrategy, getStoreUsageHighWaterMark, getSystemUsage, getTempUsage, hasRegularConsumers, isActive, isAdvisoryForConsumed, isAdvisoryForDelivery, isAdvisoryForDiscardingMessages, isAdvisoryForFastProducers, isAdvisoryForSlowConsumers, isAdvisoryWhenFull, isAlwaysRetroactive, isDisposed, isDLQ, isDoOptimzeMessageStorage, isEnableAudit, isFlowControlLogRequired, isFull, isGcIfInactive, isGcWithNetworkConsumers, isIncludeBodyForAdvisory, isLazyDispatch, isPersistJMSRedelivered, isPrioritizedMessages, isProducerFlowControl, isReduceMemoryFootprint, isSendAdvisoryIfNoConsumers, isUseCache, markForGC, messageConsumed, messageDelivered, messageDiscarded, onMessageWithNoConsumers, processDispatchNotification, removeProducer, setAdvisoryForConsumed, setAdvisoryForDelivery, setAdvisoryForDiscardingMessages, setAdvisoryForFastProducers, setAdvisoryForSlowConsumers, setAdvisoryWhenFull, setAlwaysRetroactive, setBlockedProducerWarningInterval, setCursorMemoryHighWaterMark, setDeadLetterStrategy, setDoOptimzeMessageStorage, setEnableAudit, setExpireMessagesPeriod, setGcIfInactive, setGcWithNetworkConsumers, setInactiveTimeoutBeforeGC, setIncludeBodyForAdvisory, setLazyDispatch, setMaxAuditDepth, setMaxBrowsePageSize, setMaxExpirePageSize, setMaxPageSize, setMaxProducersToAudit, setMemoryUsage, setMinimumMessageSize, setOptimizeMessageStoreInFlightLimit, setPersistJMSRedelivered, setPrioritizedMessages, setProducerFlowControl, setReduceMemoryFootprint, setSendAdvisoryIfNoConsumers, setSlowConsumerStrategy, setStoreUsageHighWaterMark, setUseCache, slowConsumer, waitForSpace, waitForSpaceprotected final CopyOnWriteArrayList<Subscription> consumers
public Topic(BrokerService brokerService, org.apache.activemq.command.ActiveMQDestination destination, TopicMessageStore store, DestinationStatistics parentStats, org.apache.activemq.thread.TaskRunnerFactory taskFactory) throws Exception
Exceptionpublic void initialize() throws Exception
BaseDestinationinitialize in class BaseDestinationExceptionpublic List<Subscription> getConsumers()
getConsumers in interface DestinationgetConsumers in class BaseDestinationpublic void addSubscription(ConnectionContext context, Subscription sub) throws Exception
addSubscription in interface DestinationaddSubscription in class BaseDestinationExceptionpublic void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception
removeSubscription in interface DestinationremoveSubscription in class BaseDestinationExceptionpublic void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception
Exceptionpublic void activate(ConnectionContext context, DurableTopicSubscription subscription) throws Exception
Exceptionpublic void deactivate(ConnectionContext context, DurableTopicSubscription sub, List<org.apache.activemq.broker.region.MessageReference> dispatched) throws Exception
Exceptionpublic void recoverRetroactiveMessages(ConnectionContext context, Subscription subscription) throws Exception
Exceptionpublic void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message message) throws Exception
send in interface DestinationExceptionpublic void acknowledge(ConnectionContext context, Subscription sub, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference node) throws IOException
acknowledge in interface DestinationIOExceptionpublic void gc()
gc in interface Destinationpublic org.apache.activemq.command.Message loadMessage(org.apache.activemq.command.MessageId messageId) throws IOException
IOExceptionpublic void start() throws Exception
start in interface org.apache.activemq.ServiceExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.ServiceExceptionpublic org.apache.activemq.command.Message[] browse()
browse in interface Destinationpublic boolean iterate()
iterate in interface org.apache.activemq.thread.Taskpublic DispatchPolicy getDispatchPolicy()
public void setDispatchPolicy(DispatchPolicy dispatchPolicy)
public SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy()
public void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy recoveryPolicy)
public final void wakeup()
Destinationwakeup in interface Destinationprotected void dispatch(ConnectionContext context, org.apache.activemq.command.Message message) throws Exception
Exceptionpublic void messageExpired(ConnectionContext context, Subscription subs, org.apache.activemq.broker.region.MessageReference reference)
DestinationmessageExpired in interface Destinationprotected Logger getLog()
getLog in class BaseDestinationprotected boolean isOptimizeStorage()
public void clearPendingMessages()
clearPendingMessages in interface Destinationpublic Map<SubscriptionKey,DurableTopicSubscription> getDurableTopicSubs()
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.