{"record":{"id":"5aa40eec9b2a08a8","repo":"apache/pulsar","slug":"expire-message-by-position-not-issued-on-topic-t","errorCode":null,"errorMessage":"Expire message by position not issued on topic ${topicName} for subscription ${subName} due to ongoing message expiration not finished or invalid message position provided.","messagePattern":"Expire message by position not issued on topic (.+?) for subscription (.+?) due to ongoing message expiration not finished or invalid message position provided\\.","errorType":"http","errorClass":"RestException","httpStatus":409,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java","lineNumber":4355,"sourceCode":"                getEntryBatchSize(batchSizeFuture, topic, messageId, batchIndex);\n\n                batchSizeFuture.thenAccept(bi -> {\n                    Position position = calculatePositionAckSet(isExcluded, bi, batchIndex, messageId);\n                    try {\n                        if (messageExpirer.expireMessages(position)) {\n                            log.info()\n                                    .attr(\"position\", position)\n                                    .attr(\"topic\", topicName)\n                                    .attr(\"subscription\", subName)\n                                    .log(\"Message expire started up to on\");\n                        } else {\n                                log.debug()\n                                        .attr(\"topic\", topicName)\n                                        .attr(\"subscription\", subName)\n                                        .log(\"Expire message by position not issued:\"\n                                                + \" ongoing expiration or subscription\"\n                                                + \" almost caught up\");\n                                throw new RestException(Status.CONFLICT,\n                                                                \"Expire message by position not issued on topic \"\n                                    + topicName + \" for subscription \" + subName + \" due to ongoing\"\n                                    + \" message expiration not finished or invalid message position provided.\");\n                        }\n                    } catch (RestException exception) {\n                        throw exception;\n                    } catch (Exception exception) {\n                        throw new RestException(exception);\n                    }\n                    asyncResponse.resume(Response.noContent().build());\n                }).exceptionally(e -> {\n                    Throwable throwable = FutureUtil.unwrapCompletionException(e);\n                    if (throwable instanceof RestException) {\n                        log.warn()\n                                .attr(\"messageId\", messageId)\n                                .attr(\"topic\", topicName)\n                                .attr(\"subscription\", subName)\n                                .exceptionMessage(throwable)","sourceCodeStart":4337,"sourceCodeEnd":4373,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L4337-L4373","documentation":"Error \"Expire message by position not issued on topic ${topicName} for subscription ${subName} due to ongoing message expiration not finished or invalid message position provided.\" thrown in apache/pulsar.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:4355 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait for any in-flight expiration on the subscription to finish and retry","Verify the message position exists and is valid for the subscription before expiring"],"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-14T05:17:10.506Z"}