In Apache Pulsar, you can acknowledge (ack) a specific message by its MessageId, which marks it as consumed for the subscription. However, this does update the subscription cursor for that message—acknowledgment is how Pulsar tracks which messages have been processed. There is no built-in way to "delete" a message from a topic without affecting the subscription cursor, as Pulsar does not support arbitrary message deletion; messages are retained or deleted based on acknowledgment and retention policies.
Recent discussions and proposals (e.g., PIP-423) are considering more granular admin APIs for acknowledging or skipping individual messages, but these still operate at the subscription level and affect the cursor. If you need to remove a message without moving the cursor, this is not currently supported by Pulsar's core features; you may need to implement custom logic outside of Pulsar or use topic compaction for some use cases. Would you like more detail on these mechanisms or upcoming features?
Sources:
-
PIP-423: Add a new admin API to acknowledge a single message 👍 0 button 👎 0 button 💡
Hint: Mention @runllm in the thread for followups.