Uses of Class
org.apache.pulsar.broker.service.Consumer
Packages that use Consumer
Package
Description
Pulsar broker interceptor.
Component for processing pending acks for transactions.
The implementation for processing pending acks in transactions.
-
Uses of Consumer in org.apache.pulsar.broker.intercept
Methods in org.apache.pulsar.broker.intercept with parameters of type ConsumerModifier and TypeMethodDescriptiondefault voidBrokerInterceptor.beforeSendMessage(Subscription subscription, Entry entry, long[] ackSet, org.apache.pulsar.common.api.proto.MessageMetadata msgMetadata, Consumer consumer) Intercept messages before sending them to the consumers.voidBrokerInterceptors.beforeSendMessage(Subscription subscription, Entry entry, long[] ackSet, org.apache.pulsar.common.api.proto.MessageMetadata msgMetadata, Consumer consumer) voidBrokerInterceptorWithClassLoader.beforeSendMessage(Subscription subscription, Entry entry, long[] ackSet, org.apache.pulsar.common.api.proto.MessageMetadata msgMetadata, Consumer consumer) default voidCalled by the broker when a consumer is closed.voidvoidBrokerInterceptorWithClassLoader.consumerClosed(ServerCnx cnx, Consumer consumer, Map<String, String> metadata) default voidIntercept after a consumer is created.voidvoidBrokerInterceptorWithClassLoader.consumerCreated(ServerCnx cnx, Consumer consumer, Map<String, String> metadata) default voidBrokerInterceptor.messageAcked(ServerCnx cnx, Consumer consumer, org.apache.pulsar.common.api.proto.CommandAck ackCmd) Intercept after a message ack is processed.voidBrokerInterceptors.messageAcked(ServerCnx cnx, Consumer consumer, org.apache.pulsar.common.api.proto.CommandAck ackCmd) voidBrokerInterceptorWithClassLoader.messageAcked(ServerCnx cnx, Consumer consumer, org.apache.pulsar.common.api.proto.CommandAck ackCmd) default voidBrokerInterceptor.messageDispatched(ServerCnx cnx, Consumer consumer, long ledgerId, long entryId, io.netty.buffer.ByteBuf headersAndPayload) Intercept after a message is dispatched to consumer.voidBrokerInterceptors.messageDispatched(ServerCnx cnx, Consumer consumer, long ledgerId, long entryId, io.netty.buffer.ByteBuf headersAndPayload) voidBrokerInterceptorWithClassLoader.messageDispatched(ServerCnx cnx, Consumer consumer, long ledgerId, long entryId, io.netty.buffer.ByteBuf headersAndPayload) -
Uses of Consumer in org.apache.pulsar.broker.service
Fields in org.apache.pulsar.broker.service with type parameters of type ConsumerModifier and TypeFieldDescriptionprotected final CopyOnWriteArrayList<Consumer>AbstractDispatcherMultipleConsumers.consumerListprotected final CopyOnWriteArrayList<Consumer>AbstractDispatcherSingleActiveConsumer.consumersprotected final com.carrotsearch.hppc.ObjectSet<Consumer>AbstractDispatcherMultipleConsumers.consumerSetMethods in org.apache.pulsar.broker.service that return ConsumerModifier and TypeMethodDescriptionHashRangeAssignment.consumer()Returns the value of theconsumerrecord component.AbstractDispatcherSingleActiveConsumer.getActiveConsumer()protected ConsumerAbstractTopic.getActiveConsumer(Subscription subscription) DrainingHashesTracker.DrainingHashEntry.getConsumer()Gets the consumer that contained the hash in pending acks at the time of creating this entry.AbstractDispatcherMultipleConsumers.getNextConsumer()Broker gives more priority while dispatching messages.AbstractDispatcherMultipleConsumers.getRandomConsumer()Get random consumer from consumerList.ConsistentHashingStickyKeyConsumerSelector.select(int hash) HashRangeAutoSplitStickyKeyConsumerSelector.select(int hash) HashRangeExclusiveStickyKeyConsumerSelector.select(int hash) default ConsumerStickyKeyConsumerSelector.select(byte[] stickyKey) Select a consumer by sticky key.StickyKeyConsumerSelector.select(int hash) Select a consumer by hash.Methods in org.apache.pulsar.broker.service that return types with arguments of type ConsumerModifier and TypeMethodDescriptionSharedConsumerAssignor.assign(List<EntryAndMetadata> entryAndMetadataList, int numConsumers) StickyKeyConsumerSelector.getConsumerKeyHashRanges()Get key hash ranges handled by each consumer.StickyKeyDispatcher.getConsumerKeyHashRanges()AbstractDispatcherMultipleConsumers.getConsumers()AbstractDispatcherSingleActiveConsumer.getConsumers()Dispatcher.getConsumers()org.apache.pulsar.common.util.collections.ConcurrentLongHashMap<CompletableFuture<Consumer>>ServerCnx.getConsumers()Subscription.getConsumers()ConsumerHashAssignmentsSnapshot.getRangesByConsumer()Get the ranges assigned to each consumer.default LinkedHashMap<Consumer,Position> StickyKeyDispatcher.getRecentlyJoinedConsumers()Topic.subscribe(SubscriptionOption option) Subscribe a topic.Topic.subscribe(TransportCnx cnx, String subscriptionName, long consumerId, org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subType, int priorityLevel, String consumerName, boolean isDurable, org.apache.pulsar.client.api.MessageId startMessageId, Map<String, String> metadata, boolean readCompacted, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, long startMessageRollbackDurationSec, boolean replicateSubscriptionState, org.apache.pulsar.common.api.proto.KeySharedMeta keySharedMeta) Deprecated.Methods in org.apache.pulsar.broker.service with parameters of type ConsumerModifier and TypeMethodDescriptionAbstractDispatcherSingleActiveConsumer.addConsumer(Consumer consumer) ConsistentHashingStickyKeyConsumerSelector.addConsumer(Consumer consumer) Dispatcher.addConsumer(Consumer consumer) HashRangeAutoSplitStickyKeyConsumerSelector.addConsumer(Consumer consumer) HashRangeExclusiveStickyKeyConsumerSelector.addConsumer(Consumer consumer) StickyKeyConsumerSelector.addConsumer(Consumer consumer) Add a new consumer.Subscription.addConsumer(Consumer consumer) protected CompletableFuture<Void>AbstractTopic.addConsumerToSubscription(Subscription subscription, Consumer consumer) voidAdd an entry to the draining hashes tracker.booleanAbstractDispatcherMultipleConsumers.canUnsubscribe(Consumer consumer) booleanAbstractDispatcherSingleActiveConsumer.canUnsubscribe(Consumer consumer) Handle unsubscribe command from the client API For failover subscription, if consumer is connected consumer, we can unsubscribe.booleanDispatcher.canUnsubscribe(Consumer consumer) protected Optional<CompletableFuture<Void>>AbstractSubscription.checkForConsumerCompatibilityErrorWithDispatcher(Dispatcher dispatcher, Consumer consumer) Checks if the given consumer is compatible with the given dispatcher.voidServerCnx.closeConsumer(Consumer consumer, Optional<BrokerLookupData> assignedBrokerLookupData) voidTransportCnx.closeConsumer(Consumer consumer, Optional<BrokerLookupData> assignedBrokerLookupData) voidDispatcher.consumerFlow(Consumer consumer, int additionalNumberOfMessages) Indicates that this consumer is now ready to receive more messages.voidSubscription.consumerFlow(Consumer consumer, int additionalNumberOfMessages) voidDrainingHashesTracker.consumerRemoved(Consumer consumer) Remove the consumer specific stats from the draining hashes tracker.Subscription.doUnsubscribe(Consumer consumer) Subscription.doUnsubscribe(Consumer consumer, boolean forcefully) intAbstractBaseDispatcher.filterEntriesForConsumer(@Nullable org.apache.pulsar.common.api.proto.MessageMetadata[] metadataArray, int startOffset, List<? extends Entry> entries, EntryBatchSizes batchSizes, SendMessageInfo sendMessageInfo, EntryBatchIndexesAcks indexesAcks, ManagedCursor cursor, boolean isReplayRead, Consumer consumer) Filter entries with prefetched message metadata range so that there is no need to peek metadata from Entry.intAbstractBaseDispatcher.filterEntriesForConsumer(List<? extends Entry> entries, EntryBatchSizes batchSizes, SendMessageInfo sendMessageInfo, EntryBatchIndexesAcks indexesAcks, ManagedCursor cursor, boolean isReplayRead, Consumer consumer) Filter messages that are being sent to a consumers.booleanPendingAcksMap.PendingAcksAddHandler.handleAdding(Consumer consumer, long ledgerId, long entryId, int stickyKeyHash) Handle the addition of a pending acknowledgment.voidPendingAcksMap.PendingAcksRemoveHandler.handleRemoving(Consumer consumer, long ledgerId, long entryId, int stickyKeyHash, boolean closing) Handle the removal of a pending acknowledgment.abstract booleanAbstractDispatcherMultipleConsumers.isConsumerAvailable(Consumer consumer) protected booleanAbstractTopic.isSameAddressConsumersExceededOnTopic(Consumer consumer) protected voidAbstractDispatcherSingleActiveConsumer.notifyActiveConsumerChanged(Consumer activeConsumer) voidImpactedConsumersResult.RemovedHashRangesProcessor.process(Consumer consumer, RemovedHashRanges removedHashRanges) voidDispatcher.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidDispatcher.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidSubscription.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidSubscription.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidDrainingHashesTracker.reduceRefCount(Consumer consumer, int stickyHash, boolean closing) Reduce the reference count for a given sticky hash.voidAbstractDispatcherSingleActiveConsumer.removeConsumer(Consumer consumer) ConsistentHashingStickyKeyConsumerSelector.removeConsumer(Consumer consumer) voidDispatcher.removeConsumer(Consumer consumer) HashRangeAutoSplitStickyKeyConsumerSelector.removeConsumer(Consumer consumer) HashRangeExclusiveStickyKeyConsumerSelector.removeConsumer(Consumer consumer) StickyKeyConsumerSelector.removeConsumer(Consumer consumer) Remove the consumer.default voidSubscription.removeConsumer(Consumer consumer) voidSubscription.removeConsumer(Consumer consumer, boolean isResetCursor) voidServerCnx.removedConsumer(Consumer consumer) voidTransportCnx.removedConsumer(Consumer consumer) EntryFilterSupport.runFiltersForEntry(Entry entry, org.apache.pulsar.common.api.proto.MessageMetadata msgMetadata, Consumer consumer) booleanDrainingHashesTracker.shouldBlockStickyKeyHash(Consumer consumer, int stickyKeyHash) Check if a sticky key hash should be blocked.voidDrainingHashesTracker.updateConsumerStats(Consumer consumer, org.apache.pulsar.common.policies.data.stats.ConsumerStatsImpl consumerStats) Update the consumer specific stats to the targetConsumerStatsImpl.Method parameters in org.apache.pulsar.broker.service with type arguments of type ConsumerModifier and TypeMethodDescriptionprotected voidAbstractBaseDispatcher.checkAndApplyReachedEndOfTopicOrTopicMigration(List<Consumer> consumers) static voidAbstractBaseDispatcher.checkAndApplyReachedEndOfTopicOrTopicMigration(PersistentTopic topic, List<Consumer> consumers) static ImpactedConsumersResultImpactedConsumersResult.of(Map<Consumer, RemovedHashRanges> removedHashRanges) Constructors in org.apache.pulsar.broker.service with parameters of type ConsumerModifierConstructorDescriptionHashRangeAssignment(org.apache.pulsar.client.api.Range range, Consumer consumer) Creates an instance of aHashRangeAssignmentrecord class. -
Uses of Consumer in org.apache.pulsar.broker.service.nonpersistent
Methods in org.apache.pulsar.broker.service.nonpersistent that return types with arguments of type ConsumerModifier and TypeMethodDescriptionNonPersistentDispatcherMultipleConsumers.getConsumers()NonPersistentSubscription.getConsumers()NonPersistentTopic.subscribe(SubscriptionOption option) NonPersistentTopic.subscribe(TransportCnx cnx, String subscriptionName, long consumerId, org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subType, int priorityLevel, String consumerName, boolean isDurable, org.apache.pulsar.client.api.MessageId startMessageId, Map<String, String> metadata, boolean readCompacted, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, long resetStartMessageBackInSec, boolean replicateSubscriptionState, org.apache.pulsar.common.api.proto.KeySharedMeta keySharedMeta) Methods in org.apache.pulsar.broker.service.nonpersistent with parameters of type ConsumerModifier and TypeMethodDescriptionNonPersistentDispatcherMultipleConsumers.addConsumer(Consumer consumer) NonPersistentStickyKeyDispatcherMultipleConsumers.addConsumer(Consumer consumer) NonPersistentSubscription.addConsumer(Consumer consumer) booleanNonPersistentDispatcherMultipleConsumers.canUnsubscribe(Consumer consumer) voidNonPersistentDispatcherMultipleConsumers.consumerFlow(Consumer consumer, int additionalNumberOfMessages) voidNonPersistentDispatcherSingleActiveConsumer.consumerFlow(Consumer consumer, int additionalNumberOfMessages) voidNonPersistentSubscription.consumerFlow(Consumer consumer, int additionalNumberOfMessages) NonPersistentSubscription.doUnsubscribe(Consumer consumer) Handle unsubscribe command from the client API Check with the dispatcher is this consumer can proceed with unsubscribe.NonPersistentSubscription.doUnsubscribe(Consumer consumer, boolean force) Handle unsubscribe command from the client API Check with the dispatcher is this consumer can proceed with unsubscribe.booleanNonPersistentDispatcherMultipleConsumers.isConsumerAvailable(Consumer consumer) default voidNonPersistentDispatcher.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) default voidNonPersistentDispatcher.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidNonPersistentSubscription.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidNonPersistentSubscription.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidNonPersistentDispatcherMultipleConsumers.removeConsumer(Consumer consumer) voidNonPersistentStickyKeyDispatcherMultipleConsumers.removeConsumer(Consumer consumer) voidNonPersistentSubscription.removeConsumer(Consumer consumer, boolean isResetCursor) -
Uses of Consumer in org.apache.pulsar.broker.service.persistent
Methods in org.apache.pulsar.broker.service.persistent that return types with arguments of type ConsumerModifier and TypeMethodDescriptionPersistentStickyKeyDispatcherMultipleConsumers.getConsumerKeyHashRanges()PersistentStickyKeyDispatcherMultipleConsumersClassic.getConsumerKeyHashRanges()PersistentDispatcherMultipleConsumers.getConsumers()PersistentDispatcherMultipleConsumersClassic.getConsumers()PersistentSubscription.getConsumers()PersistentStickyKeyDispatcherMultipleConsumersClassic.getRecentlyJoinedConsumers()PersistentTopic.subscribe(SubscriptionOption option) PersistentTopic.subscribe(TransportCnx cnx, String subscriptionName, long consumerId, org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subType, int priorityLevel, String consumerName, boolean isDurable, org.apache.pulsar.client.api.MessageId startMessageId, Map<String, String> metadata, boolean readCompacted, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, long startMessageRollbackDurationSec, boolean replicatedSubscriptionStateArg, org.apache.pulsar.common.api.proto.KeySharedMeta keySharedMeta) Methods in org.apache.pulsar.broker.service.persistent with parameters of type ConsumerModifier and TypeMethodDescriptionPersistentDispatcherMultipleConsumers.addConsumer(Consumer consumer) PersistentDispatcherMultipleConsumersClassic.addConsumer(Consumer consumer) PersistentStickyKeyDispatcherMultipleConsumers.addConsumer(Consumer consumer) PersistentStickyKeyDispatcherMultipleConsumersClassic.addConsumer(Consumer consumer) PersistentSubscription.addConsumer(Consumer consumer) PersistentDispatcherSingleActiveConsumer.calculateToRead(Consumer consumer) booleanPersistentDispatcherMultipleConsumers.canUnsubscribe(Consumer consumer) booleanPersistentDispatcherMultipleConsumersClassic.canUnsubscribe(Consumer consumer) voidPersistentDispatcherMultipleConsumers.consumerFlow(Consumer consumer, int additionalNumberOfMessages) voidPersistentDispatcherMultipleConsumersClassic.consumerFlow(Consumer consumer, int additionalNumberOfMessages) voidPersistentDispatcherSingleActiveConsumer.consumerFlow(Consumer consumer, int additionalNumberOfMessages) voidPersistentSubscription.consumerFlow(Consumer consumer, int additionalNumberOfMessages) protected voidPersistentDispatcherSingleActiveConsumer.dispatchEntriesToConsumer(Consumer currentConsumer, List<Entry> entries, EntryBatchSizes batchSizes, EntryBatchIndexesAcks batchIndexesAcks, SendMessageInfo sendMessageInfo, long epoch) PersistentSubscription.doUnsubscribe(Consumer consumer) Handle unsubscribe command from the client API Check with the dispatcher is this consumer can proceed with unsubscribe.PersistentSubscription.doUnsubscribe(Consumer consumer, boolean force) Handle unsubscribe command from the client API Check with the dispatcher is this consumer can proceed with unsubscribe.protected voidPersistentDispatcherMultipleConsumers.internalRemoveConsumer(Consumer consumer) booleanPersistentDispatcherMultipleConsumers.isConsumerAvailable(Consumer consumer) booleanPersistentDispatcherMultipleConsumersClassic.isConsumerAvailable(Consumer consumer) voidPersistentDispatcherMultipleConsumers.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidPersistentDispatcherMultipleConsumers.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidPersistentDispatcherMultipleConsumersClassic.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidPersistentDispatcherMultipleConsumersClassic.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidPersistentDispatcherSingleActiveConsumer.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidPersistentDispatcherSingleActiveConsumer.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidPersistentSubscription.redeliverUnacknowledgedMessages(Consumer consumer, long consumerEpoch) voidPersistentSubscription.redeliverUnacknowledgedMessages(Consumer consumer, List<Position> positions) voidPersistentDispatcherMultipleConsumers.removeConsumer(Consumer consumer) voidPersistentDispatcherMultipleConsumersClassic.removeConsumer(Consumer consumer) voidPersistentStickyKeyDispatcherMultipleConsumers.removeConsumer(Consumer consumer) voidPersistentStickyKeyDispatcherMultipleConsumersClassic.removeConsumer(Consumer consumer) voidPersistentSubscription.removeConsumer(Consumer consumer, boolean isResetCursor) -
Uses of Consumer in org.apache.pulsar.broker.stats.prometheus
Fields in org.apache.pulsar.broker.stats.prometheus with type parameters of type Consumer -
Uses of Consumer in org.apache.pulsar.broker.transaction.pendingack
Methods in org.apache.pulsar.broker.transaction.pendingack with parameters of type Consumer -
Uses of Consumer in org.apache.pulsar.broker.transaction.pendingack.impl
Methods in org.apache.pulsar.broker.transaction.pendingack.impl with parameters of type ConsumerModifier and TypeMethodDescriptionPendingAckHandleDisabled.abortTxn(org.apache.pulsar.client.api.transaction.TxnID txnId, Consumer consumer, long lowWaterMark) PendingAckHandleImpl.abortTxn(org.apache.pulsar.client.api.transaction.TxnID txnId, Consumer consumer, long lowWaterMark) PendingAckHandleImpl.internalAbortTxn(org.apache.pulsar.client.api.transaction.TxnID txnId, Consumer consumer, long lowWaterMark, CompletableFuture<Void> abortFuture) -
Uses of Consumer in org.apache.pulsar.compaction
Methods in org.apache.pulsar.compaction with parameters of type ConsumerModifier and TypeMethodDescriptionstatic voidCompactedTopicUtils.asyncReadCompactedEntries(TopicCompactionService topicCompactionService, ManagedCursor cursor, int maxEntries, long bytesToRead, Position maxReadPosition, boolean readFromEarliest, AsyncCallbacks.ReadEntriesCallback callback, boolean wait, Consumer consumer) voidCompactedTopic.asyncReadEntriesOrWait(ManagedCursor cursor, int maxEntries, long bytesToRead, Position maxReadPosition, boolean isFirstRead, AsyncCallbacks.ReadEntriesCallback callback, Consumer consumer) Deprecated.voidCompactedTopicImpl.asyncReadEntriesOrWait(ManagedCursor cursor, int maxEntries, long bytesToRead, Position maxReadPosition, boolean isFirstRead, AsyncCallbacks.ReadEntriesCallback callback, Consumer consumer) Deprecated.
CompactedTopicUtils.asyncReadCompactedEntries(TopicCompactionService, ManagedCursor, int, long, org.apache.bookkeeper.mledger.Position, boolean, ReadEntriesCallback, boolean, Consumer)instead.