{"record":{"id":"6a4d52ce681365a3","repo":"apache/pulsar","slug":"topic-is-temporarily-unavailable","errorCode":null,"errorMessage":"Topic is temporarily unavailable","messagePattern":"Topic is temporarily unavailable","errorType":"exception","errorClass":"BrokerServiceException.TopicFencedException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java","lineNumber":1126,"sourceCode":"\n    private void updateActiveRateLimiters() {\n        List<PublishRateLimiter> updatedRateLimiters = new ArrayList<>();\n        updatedRateLimiters.add(this.topicPublishRateLimiter);\n        updatedRateLimiters.add(getBrokerPublishRateLimiter());\n        if (isResourceGroupRateLimitingEnabled()) {\n            updatedRateLimiters.add(resourceGroupPublishLimiter);\n        }\n        activeRateLimiters = updatedRateLimiters.stream().filter(Objects::nonNull).toList();\n    }\n\n    public void updateDispatchRateLimiter() {\n    }\n\n\n    protected void checkTopicFenced() throws BrokerServiceException {\n        if (isFenced) {\n            log.warn(\"Attempting to add producer to a fenced topic\");\n            throw new BrokerServiceException.TopicFencedException(\"Topic is temporarily unavailable\");\n        }\n    }\n\n    protected CompletableFuture<Void> internalAddProducer(Producer producer) {\n        if (isSameAddressProducersExceeded(producer)) {\n            log.warn(\"Attempting to add producer to topic which reached max same address producers limit\");\n            return CompletableFuture.failedFuture(new BrokerServiceException.ProducerBusyException(\n                    \"Topic '\" + topic + \"' reached max same address producers limit\"));\n        }\n\n        log.debug()\n                .attr(\"producerName\", producer.getProducerName())\n                .log(\"Got request to create producer\");\n\n        Producer existProducer = producers.putIfAbsent(producer.getProducerName(), producer);\n        if (existProducer != null) {\n            return tryOverwriteOldProducer(existProducer, producer);\n        } else if (!producer.isRemote()) {","sourceCodeStart":1108,"sourceCodeEnd":1144,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java#L1108-L1144","documentation":"checkTopicFenced reports the topic is fenced/unavailable — it is currently owned by another broker or in a transient state where client operations must retry; producers/consumers are told to back off and reconnect later.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java:1126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after re-resolving topic ownership via lookup","Wait for the broker failover/unload to complete"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}