Package org.apache.pulsar.client.impl
Class PatternMultiTopicsConsumerImpl<T>
java.lang.Object
org.apache.pulsar.client.impl.ConsumerBase<T>
org.apache.pulsar.client.impl.MultiTopicsConsumerImpl<T>
org.apache.pulsar.client.impl.PatternMultiTopicsConsumerImpl<T>
- All Implemented Interfaces:
io.netty.util.TimerTask,Closeable,AutoCloseable,org.apache.pulsar.client.api.Consumer<T>
public class PatternMultiTopicsConsumerImpl<T>
extends MultiTopicsConsumerImpl<T>
implements io.netty.util.TimerTask
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pulsar.client.impl.ConsumerBase
ConsumerBase.OpBatchReceive<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PulsarClientImplprotected org.apache.pulsar.common.naming.NamespaceNameprotected final StringFields inherited from class org.apache.pulsar.client.impl.MultiTopicsConsumerImpl
DUMMY_TOPIC_NAME_PREFIX, partitionedTopicsFields inherited from class org.apache.pulsar.client.impl.ConsumerBase
batchReceivePolicy, batchReceiveTimeout, conf, CONSUMER_EPOCH, consumerEpoch, consumerEventListener, consumerName, CURRENT_RECEIVER_QUEUE_SIZE_UPDATER, executorProvider, externalPinnedExecutor, incomingMessagesSize, INITIAL_RECEIVER_QUEUE_SIZE, interceptors, internalPinnedExecutor, listener, maxReceiverQueueSize, MEMORY_THRESHOLD_FOR_RECEIVER_QUEUE_SIZE_EXPANSION, pendingBatchReceives, pendingReceives, reentrantLock, scaleReceiverQueueHint, schema, subscribeFuture, subscription, unAckedChunkedMessageIdSequenceMap -
Constructor Summary
ConstructorsConstructorDescriptionPatternMultiTopicsConsumerImpl(Pattern topicsPattern, String topicsHash, PulsarClientImpl client, ConsumerConfigurationData<T> conf, ExecutorProvider executorProvider, CompletableFuture<org.apache.pulsar.client.api.Consumer<T>> subscribeFuture, org.apache.pulsar.client.api.Schema<T> schema, org.apache.pulsar.common.api.proto.CommandGetTopicsOfNamespace.Mode subscriptionMode, ConsumerInterceptors<T> interceptors) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanprotected booleanprotected org.apache.pulsar.client.impl.HandlerState.StategetAndUpdateState(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater) static org.apache.pulsar.common.naming.NamespaceNamegetNameSpaceFromPattern(Pattern pattern) protected org.apache.pulsar.client.impl.HandlerState.StategetState()voidrun(io.netty.util.Timeout timeout) protected voidsetState(org.apache.pulsar.client.impl.HandlerState.State s) Methods inherited from class org.apache.pulsar.client.impl.MultiTopicsConsumerImpl
completeOpBatchReceive, createPartitionedConsumer, doAcknowledge, doAcknowledge, doReconsumeLater, getAvailablePermits, getConsumers, getLastDisconnectedTimestamp, getLastMessageIdAsync, getPartitionedTopics, getPartitions, getPartitionsAutoUpdateTimeout, getStats, getUnAckedMessageTracker, hasMessageAvailable, hasMessageAvailableAsync, hasReachedEndOfTopic, internalBatchReceive, internalBatchReceiveAsync, internalReceive, internalReceive, internalReceiveAsync, isConnected, isIllegalMultiTopicsMessageId, messageProcessed, minReceiverQueueSize, negativeAcknowledge, negativeAcknowledge, numMessagesInQueue, pause, redeliverUnacknowledgedMessages, redeliverUnacknowledgedMessages, removeConsumerAsync, resume, seek, seek, seek, seekAsync, seekAsync, seekAsync, setCurrentReceiverQueueSize, subscribeAsync, tryAcknowledgeMessage, unsubscribeAsync, unsubscribeAsync, updateAutoScaleReceiverQueueHintMethods inherited from class org.apache.pulsar.client.impl.ConsumerBase
acknowledge, acknowledge, acknowledge, acknowledge, acknowledgeAsync, acknowledgeAsync, acknowledgeAsync, acknowledgeAsync, acknowledgeAsync, acknowledgeAsync, acknowledgeAsync, acknowledgeCumulative, acknowledgeCumulative, acknowledgeCumulativeAsync, acknowledgeCumulativeAsync, acknowledgeCumulativeAsync, batchReceive, batchReceiveAsync, beforeConsume, callMessageListener, canEnqueueMessage, clearIncomingMessages, close, completePendingBatchReceive, completePendingReceive, decreaseIncomingMessageSize, doAcknowledgeWithTxn, doAcknowledgeWithTxn, enqueueMessageAndCheckBatchReceive, expectMoreIncomingMessages, failPendingReceive, getConsumerName, getCurrentReceiverQueueSize, getIncomingMessageSize, getLastMessageId, getNewMessagesImpl, getSubscription, getSubType, getTopic, getTotalIncomingMessages, hasBatchReceiveTimeout, hasEnoughMessagesForBatchReceive, hasNextPendingReceive, hasPendingBatchReceive, initReceiverQueueSize, isValidConsumerEpoch, negativeAcknowledge, nextPendingReceive, notifyPendingBatchReceivedCallBack, notifyPendingBatchReceivedCallBack, onAcknowledge, onAcknowledge, onAcknowledgeCumulative, onAcknowledgeCumulative, onAckTimeoutSend, onNegativeAcksSend, onPartitionsChange, peekMessageKey, receive, receive, receiveAsync, reconsumeLater, reconsumeLater, reconsumeLater, reconsumeLaterAsync, reconsumeLaterAsync, reconsumeLaterAsync, reconsumeLaterCumulative, reconsumeLaterCumulativeAsync, reconsumeLaterCumulativeAsync, reduceCurrentReceiverQueueSize, resetIncomingMessageSize, subscribeFuture, toString, triggerBatchReceiveTimeoutTask, tryTriggerListener, unsubscribe
-
Field Details
-
namespaceName
protected org.apache.pulsar.common.naming.NamespaceName namespaceName -
client
-
topic
-
-
Constructor Details
-
PatternMultiTopicsConsumerImpl
public PatternMultiTopicsConsumerImpl(Pattern topicsPattern, String topicsHash, PulsarClientImpl client, ConsumerConfigurationData<T> conf, ExecutorProvider executorProvider, CompletableFuture<org.apache.pulsar.client.api.Consumer<T>> subscribeFuture, org.apache.pulsar.client.api.Schema<T> schema, org.apache.pulsar.common.api.proto.CommandGetTopicsOfNamespace.Mode subscriptionMode, ConsumerInterceptors<T> interceptors)
-
-
Method Details
-
getNameSpaceFromPattern
public static org.apache.pulsar.common.naming.NamespaceName getNameSpaceFromPattern(Pattern pattern) -
run
- Specified by:
runin interfaceio.netty.util.TimerTask- Throws:
Exception
-
getPattern
-
closeAsync
- Specified by:
closeAsyncin interfaceorg.apache.pulsar.client.api.Consumer<T>- Overrides:
closeAsyncin classMultiTopicsConsumerImpl<T>
-
changeToReadyState
protected boolean changeToReadyState() -
changeToRegisteringSchemaState
protected boolean changeToRegisteringSchemaState() -
getState
protected org.apache.pulsar.client.impl.HandlerState.State getState() -
changeToConnecting
protected boolean changeToConnecting() -
setState
protected void setState(org.apache.pulsar.client.impl.HandlerState.State s) -
getAndUpdateState
protected org.apache.pulsar.client.impl.HandlerState.State getAndUpdateState(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater) -
getClient
-