apache/pulsar · error · RestException
Expire message by position not issued on topic ${topicName}
Error message
Expire message by position not issued on topic ${topicName} for subscription ${subName} due to ongoing message expiration not finished or invalid message position provided. What it means
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.
Source
Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:4355
getEntryBatchSize(batchSizeFuture, topic, messageId, batchIndex);
batchSizeFuture.thenAccept(bi -> {
Position position = calculatePositionAckSet(isExcluded, bi, batchIndex, messageId);
try {
if (messageExpirer.expireMessages(position)) {
log.info()
.attr("position", position)
.attr("topic", topicName)
.attr("subscription", subName)
.log("Message expire started up to on");
} else {
log.debug()
.attr("topic", topicName)
.attr("subscription", subName)
.log("Expire message by position not issued:"
+ " ongoing expiration or subscription"
+ " almost caught up");
throw new RestException(Status.CONFLICT,
"Expire message by position not issued on topic "
+ topicName + " for subscription " + subName + " due to ongoing"
+ " message expiration not finished or invalid message position provided.");
}
} catch (RestException exception) {
throw exception;
} catch (Exception exception) {
throw new RestException(exception);
}
asyncResponse.resume(Response.noContent().build());
}).exceptionally(e -> {
Throwable throwable = FutureUtil.unwrapCompletionException(e);
if (throwable instanceof RestException) {
log.warn()
.attr("messageId", messageId)
.attr("topic", topicName)
.attr("subscription", subName)
.exceptionMessage(throwable)View on GitHub (pinned to 820761864e)
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:4355 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/5aa40eec9b2a08a8.
Report an issue: GitHub.