Class PersistentTopic
java.lang.Object
org.apache.pulsar.broker.service.AbstractTopic
org.apache.pulsar.broker.service.persistent.PersistentTopic
- All Implemented Interfaces:
org.apache.bookkeeper.mledger.AsyncCallbacks.AddEntryCallback,Topic,TopicPolicyListener<org.apache.pulsar.common.policies.data.TopicPolicies>
- Direct Known Subclasses:
SystemTopic
public class PersistentTopic
extends AbstractTopic
implements Topic, org.apache.bookkeeper.mledger.AsyncCallbacks.AddEntryCallback
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pulsar.broker.service.Topic
Topic.PublishContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.bookkeeper.mledger.ManagedLedgerstatic final intprotected final MessageDeduplicationbooleanprotected final TransactionBufferFields inherited from class org.apache.pulsar.broker.service.AbstractTopic
addEntryLatencyStatsUsec, brokerService, bytesOutFromRemovedSubscriptions, hasBatchMessagePublished, isAllowAutoUpdateSchema, isEncryptionRequired, isFenced, lastActive, lock, msgOutFromRemovedSubscriptions, preciseTopicPublishRateLimitingEnable, producers, publishRateLimitedTimes, replicatorPrefix, resourceGroupPublishLimiter, resourceGroupRateLimitingEnabled, topic, topicEpoch, topicPolicies, topicPublishRateLimiter -
Constructor Summary
ConstructorsConstructorDescriptionPersistentTopic(String topic, org.apache.bookkeeper.mledger.ManagedLedger ledger, BrokerService brokerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComplete(org.apache.bookkeeper.mledger.Position pos, io.netty.buffer.ByteBuf entryData, Object ctx) voidaddProducer(Producer producer, CompletableFuture<Void> producerQueuedFuture) Tries to add a producer to the topic.protected CompletableFuture<Void>addReplicationCluster(String remoteCluster, org.apache.bookkeeper.mledger.ManagedCursor cursor, String localCluster) addSchemaIfIdleOrCheckCompatible(org.apache.pulsar.common.protocol.schema.SchemaData schema) If the topic is idle (no producers, no entries, no subscribers and no existing schema), add the passed schema to the topic.CompletableFuture<org.apache.pulsar.common.policies.data.stats.TopicStatsImpl>asyncGetStats(boolean getPreciseBacklog, boolean subscriptionBacklogSize, boolean getEarliestTimeInBacklog) voidasyncReadEntry(org.apache.bookkeeper.mledger.impl.PositionImpl position, org.apache.bookkeeper.mledger.AsyncCallbacks.ReadEntryCallback callback, Object ctx) voidActivate cursors those caught up backlog-threshold entries and deactivate slow cursors which are creating backlog.checkBacklogQuotaExceeded(String producerName, org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType backlogQuotaType) voidvoidvoidvoidcheckGC()checkIfTransactionBufferRecoverCompletely(boolean isTxnEnabled) Wait TransactionBuffer Recovers completely.voidvoidvoidvoidvoidbooleancheckSubscriptionTypesEnable(org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subType) Clears backlog for all cursors in the topic.clearBacklog(String cursorName) Clears backlog for a given cursor in the topic.close()close(boolean closeWithoutWaitingClientDisconnect) Close this topic - close all producers and subscriptions associated with this topic.org.apache.pulsar.client.admin.LongRunningProcessStatuscreateSubscription(String subscriptionName, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, boolean replicateSubscriptionState, Map<String, String> subscriptionProperties) delete()Delete the managed ledger associated with this topic.Forcefully close all producers/consumers/replicators and deletes the topic.endTxn(org.apache.pulsar.client.api.transaction.TxnID txnID, int txnAction, long lowWaterMark) End the transaction in this topic.org.apache.pulsar.common.policies.data.BacklogQuotagetBacklogQuota(org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType backlogQuotaType) longlongorg.apache.bookkeeper.mledger.impl.PositionImplCompletableFuture<org.apache.pulsar.common.policies.data.PersistentTopicInternalStats>getInternalStats(boolean includeLedgerMetadata) longCompletableFuture<org.apache.pulsar.client.api.MessageId>org.apache.bookkeeper.mledger.PositionlonggetLastPublishedSequenceId(String producerName) doubledoubleorg.apache.bookkeeper.mledger.ManagedLedgerorg.apache.bookkeeper.mledger.impl.PositionImplintintlongintgetNumberOfSameAddressConsumers(String clientAddress) CompletableFuture<org.apache.bookkeeper.mledger.ManagedLedger>getPendingAckManagedLedger(String subName) getPersistentReplicator(String remoteCluster) org.apache.bookkeeper.mledger.impl.PositionImplgetPositionAfterN(org.apache.bookkeeper.mledger.impl.PositionImpl startPosition, long n) org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap<String,Replicator> org.apache.pulsar.common.policies.data.stats.TopicStatsImplgetStats(boolean getPreciseBacklog, boolean subscriptionBacklogSize, boolean getEarliestTimeInBacklog) getSubscription(String subscriptionName) org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap<String,PersistentSubscription> org.apache.pulsar.common.policies.data.TransactionBufferStatsgetTransactionBufferStats(boolean lowWaterMarks) org.apache.pulsar.common.policies.data.TransactionInBufferStatsgetTransactionInBufferStats(org.apache.pulsar.client.api.transaction.TxnID txnID) org.apache.pulsar.common.policies.data.TransactionInPendingAckStatsgetTransactionInPendingAckStats(org.apache.pulsar.client.api.transaction.TxnID txnID, String subName) org.apache.pulsar.common.policies.data.TransactionPendingAckStatsgetTransactionPendingAckStats(String subName, boolean lowWaterMarks) protected voidhandleProducerRemoved(Producer producer) protected CompletableFuture<Long>incrementTopicEpoch(Optional<Long> currentEpoch) protected CompletableFuture<Void>booleanisActive(org.apache.pulsar.common.policies.data.InactiveTopicDeleteMode deleteMode) booleanbooleanbooleanbooleanisOldestMessageExpired(org.apache.bookkeeper.mledger.ManagedCursor cursor, int messageTTLInSeconds) booleanbooleanbooleanbooleanprotected booleanbooleanisTxnAborted(org.apache.pulsar.client.api.transaction.TxnID txnID) org.apache.pulsar.client.admin.OffloadProcessStatusonPoliciesUpdate(org.apache.pulsar.common.policies.data.Policies data) voidonUpdate(org.apache.pulsar.common.policies.data.TopicPolicies policies) voidpublishMessage(io.netty.buffer.ByteBuf headersAndPayload, Topic.PublishContext publishContext) voidpublishTxnMessage(org.apache.pulsar.client.api.transaction.TxnID txnID, io.netty.buffer.ByteBuf headersAndPayload, Topic.PublishContext publishContext) Publish Transaction message to this Topic's TransactionBuffer.protected CompletableFuture<Long>setTopicEpoch(long newEpoch) subscribe(SubscriptionOption option) Subscribe a 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 replicatedSubscriptionStateArg, org.apache.pulsar.common.api.proto.KeySharedMeta keySharedMeta) CompletableFuture<org.apache.pulsar.client.api.MessageId>voidvoidtriggerOffload(org.apache.pulsar.client.impl.MessageIdImpl messageId) truncate()Truncate a topic.unsubscribe(String subscriptionName) Delete the cursor ledger for a given subscription.voidvoidupdateRates(NamespaceStats nsStats, org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats bundleStats, StatsOutputStream topicStatsStream, ClusterReplicationMetrics replStats, String namespace, boolean hydratePublishers) voidMethods inherited from class org.apache.pulsar.broker.service.AbstractTopic
addConsumerToSubscription, addFilteredEntriesCount, addSchema, checkSchemaCompatibleForConsumer, checkTopicFenced, checkTopicPublishThrottlingRate, currentUsageCount, decrementUsageCount, deletePartitionedTopicMetadataWhileInactive, deleteSchema, deleteTopicPolicies, disableCnxAutoRead, disableProducerRead, enableCnxAutoRead, enableProducerReadForPublishBufferLimiting, enableProducerReadForPublishRateLimiting, getActiveConsumer, getBrokerPublishRateLimiter, getBrokerService, getBytesInCounter, getBytesOutCounter, getDispatchRate, getFilteredEntriesCount, getHierarchyTopicPolicies, getInactiveTopicPolicies, getMsgInCounter, getMsgOutCounter, getName, getNumberOfSameAddressConsumers, getNumberOfSameAddressProducers, getProducers, getReplicatorDispatchRate, getReplicatorPrefix, getSchemaCompatibilityStrategy, getSchemaValidationEnforced, getSubscribeRate, getSubscriptionDispatchRate, getTopicPolicies, getTopicPublishRateLimiter, getWaitingProducersCount, handleConsumerAdded, hasLocalProducers, hasSchema, increasePublishLimitedTimes, incrementPublishCount, incrementTopicEpochIfNeeded, internalAddProducer, isBrokerPublishRateExceeded, isConsumersExceededOnTopic, isDeleteWhileInactive, isEncryptionRequired, isExceedMaximumMessageSize, isProducersExceeded, isPublishRateExceeded, isResourceGroupPublishRateExceeded, isResourceGroupRateLimitingEnabled, isSameAddressConsumersExceededOnTopic, isSameAddressProducersExceeded, isTopicPublishRateExceeded, markBatchMessagePublished, recordAddLatency, registerTopicPolicyListener, removeProducer, resetBrokerPublishCountAndEnableReadIfRequired, resetTopicPublishCountAndEnableReadIfRequired, toString, unregisterTopicPolicyListener, updateBrokerDispatchRate, updateBrokerPublishRate, updateBrokerReplicatorDispatchRate, updateBrokerSubscribeRate, updateBrokerSubscriptionDispatchRate, updateBrokerSubscriptionTypesEnabled, updatePublishDispatcher, updateResourceGroupLimiter, updateTopicPolicy, updateTopicPolicyByNamespacePolicyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.pulsar.broker.service.Topic
addSchema, checkSchemaCompatibleForConsumer, checkTopicPublishThrottlingRate, deleteSchema, disableCnxAutoRead, enableCnxAutoRead, getBrokerService, getHierarchyTopicPolicies, getName, getProducers, getSchemaValidationEnforced, hasSchema, increasePublishLimitedTimes, incrementPublishCount, isBrokerPublishRateExceeded, isEncryptionRequired, isPublishRateExceeded, isResourceGroupPublishRateExceeded, isResourceGroupRateLimitingEnabled, isTopicPublishRateExceeded, recordAddLatency, removeProducer, resetBrokerPublishCountAndEnableReadIfRequired, resetTopicPublishCountAndEnableReadIfRequired
-
Field Details
-
ledger
protected final org.apache.bookkeeper.mledger.ManagedLedger ledger -
msgChunkPublished
public boolean msgChunkPublished -
MESSAGE_RATE_BACKOFF_MS
public static final int MESSAGE_RATE_BACKOFF_MS- See Also:
-
messageDeduplication
-
transactionBuffer
-
-
Constructor Details
-
PersistentTopic
public PersistentTopic(String topic, org.apache.bookkeeper.mledger.ManagedLedger ledger, BrokerService brokerService)
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceTopic
-
publishMessage
public void publishMessage(io.netty.buffer.ByteBuf headersAndPayload, Topic.PublishContext publishContext) - Specified by:
publishMessagein interfaceTopic
-
updateSubscribeRateLimiter
public void updateSubscribeRateLimiter() -
asyncReadEntry
public void asyncReadEntry(org.apache.bookkeeper.mledger.impl.PositionImpl position, org.apache.bookkeeper.mledger.AsyncCallbacks.ReadEntryCallback callback, Object ctx) -
getPositionAfterN
public org.apache.bookkeeper.mledger.impl.PositionImpl getPositionAfterN(org.apache.bookkeeper.mledger.impl.PositionImpl startPosition, long n) throws org.apache.bookkeeper.mledger.ManagedLedgerException - Throws:
org.apache.bookkeeper.mledger.ManagedLedgerException
-
getFirstPosition
public org.apache.bookkeeper.mledger.impl.PositionImpl getFirstPosition() throws org.apache.bookkeeper.mledger.ManagedLedgerException- Throws:
org.apache.bookkeeper.mledger.ManagedLedgerException
-
getNumberOfEntries
public long getNumberOfEntries() -
addComplete
public void addComplete(org.apache.bookkeeper.mledger.Position pos, io.netty.buffer.ByteBuf entryData, Object ctx) - Specified by:
addCompletein interfaceorg.apache.bookkeeper.mledger.AsyncCallbacks.AddEntryCallback
-
addFailed
- Specified by:
addFailedin interfaceorg.apache.bookkeeper.mledger.AsyncCallbacks.AddEntryCallback
-
addProducer
public CompletableFuture<Optional<Long>> addProducer(Producer producer, CompletableFuture<Void> producerQueuedFuture) Description copied from interface:TopicTries to add a producer to the topic. Several validations will be performed.- Specified by:
addProducerin interfaceTopic- Overrides:
addProducerin classAbstractTopicproducerQueuedFuture- a future that will be triggered if the producer is being queued up prior of getting established- Returns:
- the "topic epoch" if there is one or empty
-
checkIfTransactionBufferRecoverCompletely
Description copied from interface:TopicWait TransactionBuffer Recovers completely. Take snapshot after TB Recovers completely.- Specified by:
checkIfTransactionBufferRecoverCompletelyin interfaceTopic- Returns:
- a future which has completely if isTxn = false. Or a future return by takeSnapshot.
-
incrementTopicEpoch
- Specified by:
incrementTopicEpochin classAbstractTopic
-
setTopicEpoch
- Specified by:
setTopicEpochin classAbstractTopic
-
startReplProducers
-
stopReplProducers
-
handleProducerRemoved
- Overrides:
handleProducerRemovedin classAbstractTopic
-
subscribe
Description copied from interface:TopicSubscribe a topic. -
createSubscription
public CompletableFuture<Subscription> createSubscription(String subscriptionName, org.apache.pulsar.common.api.proto.CommandSubscribe.InitialPosition initialPosition, boolean replicateSubscriptionState, Map<String, String> subscriptionProperties) - Specified by:
createSubscriptionin interfaceTopic
-
unsubscribe
Delete the cursor ledger for a given subscription.- Specified by:
unsubscribein interfaceTopic- Parameters:
subscriptionName- Subscription for which the cursor ledger is to be deleted- Returns:
- Completable future indicating completion of unsubscribe operation Completed exceptionally with: ManagedLedgerException if cursor ledger delete fails
-
delete
Delete the managed ledger associated with this topic. -
deleteForcefully
Forcefully close all producers/consumers/replicators and deletes the topic. this function is used when local cluster is removed from global-namespace replication list. Because broker doesn't allow lookup if local cluster is not part of replication cluster list.- Specified by:
deleteForcefullyin interfaceTopic- Returns:
-
close
-
close
Close this topic - close all producers and subscriptions associated with this topic. -
checkDeduplicationStatus
-
checkReplication
- Specified by:
checkReplicationin interfaceTopic
-
checkMessageExpiry
public void checkMessageExpiry()- Specified by:
checkMessageExpiryin interfaceTopic
-
checkMessageDeduplicationInfo
public void checkMessageDeduplicationInfo()- Specified by:
checkMessageDeduplicationInfoin interfaceTopic
-
isCompactionEnabled
public boolean isCompactionEnabled() -
checkCompaction
public void checkCompaction() -
preCreateSubscriptionForCompactionIfNeeded
-
addReplicationCluster
protected CompletableFuture<Void> addReplicationCluster(String remoteCluster, org.apache.bookkeeper.mledger.ManagedCursor cursor, String localCluster) -
isDeduplicationEnabled
public boolean isDeduplicationEnabled() -
getNumberOfConsumers
public int getNumberOfConsumers()- Specified by:
getNumberOfConsumersin classAbstractTopic
-
getNumberOfSameAddressConsumers
- Specified by:
getNumberOfSameAddressConsumersin classAbstractTopic
-
getSubscriptions
public org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap<String,PersistentSubscription> getSubscriptions()- Specified by:
getSubscriptionsin interfaceTopic
-
getSubscription
- Specified by:
getSubscriptionin interfaceTopic
-
getReplicators
public org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap<String,Replicator> getReplicators()- Specified by:
getReplicatorsin interfaceTopic
-
getPersistentReplicator
-
getManagedLedger
public org.apache.bookkeeper.mledger.ManagedLedger getManagedLedger() -
updateRates
public void updateRates(NamespaceStats nsStats, org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats bundleStats, StatsOutputStream topicStatsStream, ClusterReplicationMetrics replStats, String namespace, boolean hydratePublishers) - Specified by:
updateRatesin interfaceTopic
-
getLastUpdatedAvgPublishRateInMsg
public double getLastUpdatedAvgPublishRateInMsg() -
getLastUpdatedAvgPublishRateInByte
public double getLastUpdatedAvgPublishRateInByte() -
getStats
public org.apache.pulsar.common.policies.data.stats.TopicStatsImpl getStats(boolean getPreciseBacklog, boolean subscriptionBacklogSize, boolean getEarliestTimeInBacklog) -
asyncGetStats
public CompletableFuture<org.apache.pulsar.common.policies.data.stats.TopicStatsImpl> asyncGetStats(boolean getPreciseBacklog, boolean subscriptionBacklogSize, boolean getEarliestTimeInBacklog) - Specified by:
asyncGetStatsin interfaceTopic
-
getInternalStats
public CompletableFuture<org.apache.pulsar.common.policies.data.PersistentTopicInternalStats> getInternalStats(boolean includeLedgerMetadata) - Specified by:
getInternalStatsin interfaceTopic
-
getCompactedTopicContext
-
getBacklogSize
public long getBacklogSize() -
isActive
public boolean isActive(org.apache.pulsar.common.policies.data.InactiveTopicDeleteMode deleteMode) -
checkGC
public void checkGC() -
checkInactiveSubscriptions
public void checkInactiveSubscriptions()- Specified by:
checkInactiveSubscriptionsin interfaceTopic
-
checkBackloggedCursors
public void checkBackloggedCursors()Description copied from interface:TopicActivate cursors those caught up backlog-threshold entries and deactivate slow cursors which are creating backlog.- Specified by:
checkBackloggedCursorsin interfaceTopic
-
checkInactiveLedgers
public void checkInactiveLedgers() -
checkCursorsToCacheEntries
public void checkCursorsToCacheEntries()- Specified by:
checkCursorsToCacheEntriesin interfaceTopic
-
checkDeduplicationSnapshot
public void checkDeduplicationSnapshot()- Specified by:
checkDeduplicationSnapshotin interfaceTopic
-
onLocalPoliciesUpdate
-
updateDispatchRateLimiter
public void updateDispatchRateLimiter()- Overrides:
updateDispatchRateLimiterin classAbstractTopic
-
onPoliciesUpdate
public CompletableFuture<Void> onPoliciesUpdate(org.apache.pulsar.common.policies.data.Policies data) - Specified by:
onPoliciesUpdatein interfaceTopic
-
getBacklogQuota
public org.apache.pulsar.common.policies.data.BacklogQuota getBacklogQuota(org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType backlogQuotaType) - Specified by:
getBacklogQuotain interfaceTopic- Returns:
- Backlog quota for topic
-
checkBacklogQuotaExceeded
public CompletableFuture<Void> checkBacklogQuotaExceeded(String producerName, org.apache.pulsar.common.policies.data.BacklogQuota.BacklogQuotaType backlogQuotaType) - Specified by:
checkBacklogQuotaExceededin interfaceTopic- Returns:
- quota exceeded status for blocking producer creation
-
isSizeBacklogExceeded
public boolean isSizeBacklogExceeded()- Returns:
- determine if backlog quota enforcement needs to be done for topic based on size limit
-
checkTimeBacklogExceeded
- Returns:
- determine if backlog quota enforcement needs to be done for topic based on time limit
-
isReplicated
public boolean isReplicated()- Specified by:
isReplicatedin interfaceTopic
-
terminate
-
isOldestMessageExpired
public boolean isOldestMessageExpired(org.apache.bookkeeper.mledger.ManagedCursor cursor, int messageTTLInSeconds) -
clearBacklog
Clears backlog for all cursors in the topic.- Returns:
-
clearBacklog
Clears backlog for a given cursor in the topic.Note: For a replication cursor, just provide the remote cluster name
- Parameters:
cursorName-- Returns:
-
getDispatchRateLimiter
- Specified by:
getDispatchRateLimiterin interfaceTopic
-
getBrokerDispatchRateLimiter
- Specified by:
getBrokerDispatchRateLimiterin interfaceTopic
-
getSubscribeRateLimiter
- Specified by:
getSubscribeRateLimiterin interfaceTopic
-
getLastPublishedSequenceId
-
getLastPosition
public org.apache.bookkeeper.mledger.Position getLastPosition()- Specified by:
getLastPositionin interfaceTopic
-
getLastMessageId
- Specified by:
getLastMessageIdin interfaceTopic
-
triggerCompaction
public void triggerCompaction() throws org.apache.pulsar.broker.PulsarServerException, BrokerServiceException.AlreadyRunningException- Throws:
org.apache.pulsar.broker.PulsarServerExceptionBrokerServiceException.AlreadyRunningException
-
compactionStatus
public org.apache.pulsar.client.admin.LongRunningProcessStatus compactionStatus() -
triggerOffload
public void triggerOffload(org.apache.pulsar.client.impl.MessageIdImpl messageId) throws BrokerServiceException.AlreadyRunningException -
offloadStatus
public org.apache.pulsar.client.admin.OffloadProcessStatus offloadStatus() -
addSchemaIfIdleOrCheckCompatible
public CompletableFuture<Void> addSchemaIfIdleOrCheckCompatible(org.apache.pulsar.common.protocol.schema.SchemaData schema) Description copied from interface:TopicIf the topic is idle (no producers, no entries, no subscribers and no existing schema), add the passed schema to the topic. Otherwise, check that the passed schema is compatible with what the topic already has.- Specified by:
addSchemaIfIdleOrCheckCompatiblein interfaceTopic
-
checkReplicatedSubscriptionControllerState
public void checkReplicatedSubscriptionControllerState() -
getReplicatedSubscriptionController
-
getCompactedTopic
-
isSystemTopic
public boolean isSystemTopic()- Specified by:
isSystemTopicin interfaceTopic
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin interfaceTopic
-
publishTxnMessage
public void publishTxnMessage(org.apache.pulsar.client.api.transaction.TxnID txnID, io.netty.buffer.ByteBuf headersAndPayload, Topic.PublishContext publishContext) Description copied from interface:TopicPublish Transaction message to this Topic's TransactionBuffer.- Specified by:
publishTxnMessagein interfaceTopic- Parameters:
txnID- Transaction IdheadersAndPayload- Message datapublishContext- Publish context
-
endTxn
public CompletableFuture<Void> endTxn(org.apache.pulsar.client.api.transaction.TxnID txnID, int txnAction, long lowWaterMark) Description copied from interface:TopicEnd the transaction in this topic. -
truncate
Description copied from interface:TopicTruncate a topic. The truncate operation will move all cursors to the end of the topic and delete all inactive ledgers. -
getDelayedDeliveryTickTimeMillis
public long getDelayedDeliveryTickTimeMillis() -
isDelayedDeliveryEnabled
public boolean isDelayedDeliveryEnabled() -
getMaxUnackedMessagesOnSubscription
public int getMaxUnackedMessagesOnSubscription() -
onUpdate
public void onUpdate(org.apache.pulsar.common.policies.data.TopicPolicies policies) - Specified by:
onUpdatein interfaceTopicPolicyListener<org.apache.pulsar.common.policies.data.TopicPolicies>
-
initTopicPolicy
-
getMessageDeduplication
-
checkSubscriptionTypesEnable
public boolean checkSubscriptionTypesEnable(org.apache.pulsar.common.api.proto.CommandSubscribe.SubType subType) -
getTransactionBufferStats
public org.apache.pulsar.common.policies.data.TransactionBufferStats getTransactionBufferStats(boolean lowWaterMarks) -
getTransactionPendingAckStats
public org.apache.pulsar.common.policies.data.TransactionPendingAckStats getTransactionPendingAckStats(String subName, boolean lowWaterMarks) -
getMaxReadPosition
public org.apache.bookkeeper.mledger.impl.PositionImpl getMaxReadPosition() -
isTxnAborted
public boolean isTxnAborted(org.apache.pulsar.client.api.transaction.TxnID txnID) -
getTransactionInBufferStats
public org.apache.pulsar.common.policies.data.TransactionInBufferStats getTransactionInBufferStats(org.apache.pulsar.client.api.transaction.TxnID txnID) -
isTerminated
protected boolean isTerminated()- Specified by:
isTerminatedin classAbstractTopic
-
getTransactionInPendingAckStats
public org.apache.pulsar.common.policies.data.TransactionInPendingAckStats getTransactionInPendingAckStats(org.apache.pulsar.client.api.transaction.TxnID txnID, String subName) -
getPendingAckManagedLedger
public CompletableFuture<org.apache.bookkeeper.mledger.ManagedLedger> getPendingAckManagedLedger(String subName) -
getLastDataMessagePublishedTimestamp
public long getLastDataMessagePublishedTimestamp()
-