Class NonPersistentDispatcherSingleActiveConsumer
java.lang.Object
org.apache.pulsar.broker.service.EntryFilterSupport
org.apache.pulsar.broker.service.AbstractBaseDispatcher
org.apache.pulsar.broker.service.AbstractDispatcherSingleActiveConsumer
org.apache.pulsar.broker.service.nonpersistent.NonPersistentDispatcherSingleActiveConsumer
- All Implemented Interfaces:
Dispatcher,NonPersistentDispatcher
public final class NonPersistentDispatcherSingleActiveConsumer
extends AbstractDispatcherSingleActiveConsumer
implements NonPersistentDispatcher
-
Field Summary
Fields inherited from class org.apache.pulsar.broker.service.AbstractDispatcherSingleActiveConsumer
ACTIVE_CONSUMER_UPDATER, closeFuture, consumers, cursor, FALSE, IS_CLOSED_UPDATER, isFirstRead, isKeyHashRangeFiltered, partitionIndex, stickyKeyConsumerSelector, subscriptionType, topicName, TRUEFields inherited from class org.apache.pulsar.broker.service.AbstractBaseDispatcher
dispatchThrottlingOnBatchMessageEnabled, serviceConfigFields inherited from class org.apache.pulsar.broker.service.EntryFilterSupport
entryFilters, filterContext -
Constructor Summary
ConstructorsConstructorDescriptionNonPersistentDispatcherSingleActiveConsumer(org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subscriptionType, int partitionIndex, NonPersistentTopic topic, Subscription subscription) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidconsumerFlow(Consumer consumer, int additionalNumberOfMessages) Indicates that this consumer is now ready to receive more messages.org.apache.pulsar.common.stats.Ratebooleanprotected booleanDetermine whether the number of consumers on the subscription reaches the threshold.protected voidreadMoreEntries(Consumer consumer) protected voidprotected voidvoidsendMessages(List<org.apache.bookkeeper.mledger.Entry> entries) Methods inherited from class org.apache.pulsar.broker.service.AbstractDispatcherSingleActiveConsumer
addConsumer, canUnsubscribe, close, disconnectActiveConsumers, disconnectAllConsumers, getActiveConsumer, getConsumers, getType, isClosed, isConsumerConnected, notifyActiveConsumerChanged, pickAndScheduleActiveConsumer, removeConsumer, reset, resetCloseFutureMethods inherited from class org.apache.pulsar.broker.service.AbstractBaseDispatcher
computeReadLimits, filterEntriesForConsumer, filterEntriesForConsumer, getFilterAcceptedMsgCount, getFilterProcessedMsgCount, getFilterRejectedMsgCount, getFilterRescheduledMsgCount, getSubscriptionName, isConsumersExceededOnSubscription, peekStickyKey, reachDispatchRateLimit, updateMessagesToRead, updatePendingBytesToDispatchMethods inherited from class org.apache.pulsar.broker.service.EntryFilterSupport
runFiltersForEntryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.broker.service.Dispatcher
addConsumer, canUnsubscribe, checkAndUnblockIfStuck, clearDelayedMessages, close, cursorIsReset, disconnectActiveConsumers, disconnectAllConsumers, disconnectAllConsumers, getConsumers, getFilterAcceptedMsgCount, getFilterProcessedMsgCount, getFilterRejectedMsgCount, getFilterRescheduledMsgCount, getNumberOfDelayedMessages, getRateLimiter, getType, initializeDispatchRateLimiterIfNeeded, isClosed, isConsumerConnected, markDeletePositionMoveForward, removeConsumer, reset, resetCloseFuture, trackDelayedDelivery, updateRateLimiterMethods inherited from interface org.apache.pulsar.broker.service.nonpersistent.NonPersistentDispatcher
addUnAckedMessages, redeliverUnacknowledgedMessages, redeliverUnacknowledgedMessages
-
Constructor Details
-
NonPersistentDispatcherSingleActiveConsumer
public NonPersistentDispatcherSingleActiveConsumer(org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subscriptionType, int partitionIndex, NonPersistentTopic topic, Subscription subscription)
-
-
Method Details
-
sendMessages
- Specified by:
sendMessagesin interfaceNonPersistentDispatcher
-
isConsumersExceededOnSubscription
protected boolean isConsumersExceededOnSubscription()Description copied from class:AbstractBaseDispatcherDetermine whether the number of consumers on the subscription reaches the threshold.- Specified by:
isConsumersExceededOnSubscriptionin classAbstractBaseDispatcher- Returns:
-
getMessageDropRate
public org.apache.pulsar.common.stats.Rate getMessageDropRate()- Specified by:
getMessageDropRatein interfaceNonPersistentDispatcher
-
hasPermits
public boolean hasPermits()- Specified by:
hasPermitsin interfaceNonPersistentDispatcher
-
consumerFlow
Description copied from interface:DispatcherIndicates that this consumer is now ready to receive more messages.- Specified by:
consumerFlowin interfaceDispatcher
-
getRedeliveryTracker
- Specified by:
getRedeliveryTrackerin interfaceDispatcher
-
scheduleReadOnActiveConsumer
protected void scheduleReadOnActiveConsumer()- Specified by:
scheduleReadOnActiveConsumerin classAbstractDispatcherSingleActiveConsumer
-
readMoreEntries
- Specified by:
readMoreEntriesin classAbstractDispatcherSingleActiveConsumer
-
cancelPendingRead
protected void cancelPendingRead()- Specified by:
cancelPendingReadin classAbstractDispatcherSingleActiveConsumer
-
reScheduleRead
protected void reScheduleRead()- Specified by:
reScheduleReadin classAbstractBaseDispatcher
-