GitHub user tisonkun edited a comment on the discussion: Why don't
org.apache.pulsar.client.api.Producer and org.apache.pulsar.client.api.Consumer
provide an isClose method?
Make sense. After all in the reported case @maozhitao12450 has access to the
producer. And you may wrap up your own producer extend:
```java
public class ProducerExtend implements AutoClosable {
public final Producer producer;
public final AtomicBoolean closed = new AtomicBoolean();
@Override
public void close() throws Exception {
// follow the comments above
}
}
```
GitHub link:
https://github.com/apache/pulsar/discussions/20510#discussioncomment-6118994
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]