Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
- flink 1.17
- pulsar client 3.0.0
- org.apache.flink:flink-connector-pulsar:4.1.0-1.17 (connector)
Description
- The unnecessary codes calls `pulsarClient.getLookup().getPartitionedTopicMetadata()` to create the partitioned topic metadata(in fact, this behavior of is not correct)
- Why it is unnecessary: the [following code](https://github.com/apache/flink-connector-pulsar/blob/main/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/sink/writer/topic/ProducerRegister.java#L245) that is creating a producer will also trigger partitioned topic metadata to create. - The method `pulsarClient.getLookup().getPartitionedTopicMetadata()` will not retry if the connection is closed so that users will get an error. The following code creates a producer that will retry if the connection is closed, reducing the probability of an error occurring.
Attachments
Issue Links
- links to