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 PulsarClientImpl
protected org.apache.pulsar.common.naming.NamespaceName
protected final String
Fields inherited from class org.apache.pulsar.client.impl.MultiTopicsConsumerImpl
DUMMY_TOPIC_NAME_PREFIX, partitionedTopics
Fields 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, MESSAGE_LISTENER_QUEUE_SIZE_UPDATER, messageListenerQueueSize, 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 boolean
protected boolean
protected boolean
protected org.apache.pulsar.client.impl.HandlerState.State
getAndUpdateState
(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater) static org.apache.pulsar.common.naming.NamespaceName
getNameSpaceFromPattern
(Pattern pattern) protected org.apache.pulsar.client.impl.HandlerState.State
getState()
void
run
(io.netty.util.Timeout timeout) protected void
setState
(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, updateAutoScaleReceiverQueueHint
Methods 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:
run
in interfaceio.netty.util.TimerTask
- Throws:
Exception
-
getPattern
-
closeAsync
- Specified by:
closeAsync
in interfaceorg.apache.pulsar.client.api.Consumer<T>
- Overrides:
closeAsync
in 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
-