merlimat opened a new pull request, #26130:
URL: https://github.com/apache/pulsar/pull/26130
### Motivation
The v5 multi-topic (namespace/filter) consumers subscribe one per-topic
consumer per matched topic, and a per-topic subscribe failure schedules a
backoff retry on the client timer. That retry was never cancelled when the
topic left the match set (or the whole consumer closed), so a stale timer
could fire *after* the topic had been removed and re-subscribe a topic that
should stay closed — leaking a subscription and delivering messages from a
topic that no longer matches the filter.
Sequence: topic `T` added → subscribe fails → retry armed → watcher removes
`T` → `closeTopic(T)` (no-op) → timer fires → `openTopic(T)` re-subscribes
it.
### Modifications
- Track the pending `Timeout` per topic and cancel it in `closeTopic()` (and
cancel all still-pending ones in `closeAsync()`), in both
`MultiTopicQueueConsumer` and `MultiTopicStreamConsumer`.
- Drive-by cleanups in the same two files: fix a stale "pump thread" javadoc
(delivery is via an injected sink, no pump thread) and remove the unused
`parentTopic` field from `PerTopicState`/`PerTopic`.
### Verifying this change
This is a small, self-contained correctness fix. `pulsar-client-v5` compiles,
checkstyle passes, and the existing module tests pass. The multiplex delivery
path itself is exercised by the higher-level scalable-topic integration
tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]