You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "leolztang (via GitHub)" <gi...@apache.org> on 2024/08/11 02:40:56 UTC

[D] There may be a deadLetterProducer connection leak [pulsar]

GitHub user leolztang created a discussion: There may be a deadLetterProducer connection leak

In the processPossibleToDLQ method of ConsumerImpl.java, in case of an exception, it only sets deadLetterProducer to null without closing deadLetterProducer. This may cause a DLQ producer connection leak if an exception is thrown while creating the DLQ message. This issue can be reproduced in earlier versions of pulsar-client, such as 2.10.0: if the message does not have a schema version (Topic with JSON schema), message.getReaderSchema() throws an NPE. Although the NPE in message.getReaderSchema() has been fixed since version 2.10.1, my question is whether the exception handling of deadLetterProducer is reasonable?

<img width="1474" alt="image" src="https://github.com/user-attachments/assets/59c45c4a-6564-4dcf-aec0-e1a41f13b70d">


GitHub link: https://github.com/apache/pulsar/discussions/23151

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org