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?
> Interestingly, if the producer is closed in a way other than
> producer.closeAsync();
Can you describe a bit concrete? I suppose a reasonable resource management
code should handle liveness properly. Said:
```java
try (producerExtend) {
...
}
// or propagate the lifecycle to any context outside like we combine
ProducerExtend
public class XxxContext implements Closeable {
@Override
public void close() throws IOException {
producerExtend.close();
}
}
```
GitHub link:
https://github.com/apache/pulsar/discussions/20510#discussioncomment-6121129
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]