Yubiao Feng created FLINK-34962: ----------------------------------- Summary: flink-connector-pulsa starts failed due to incorrect use of Pulsar API: LookupService. getPartitionedTopicMetadata Key: FLINK-34962 URL: https://issues.apache.org/jira/browse/FLINK-34962 Project: Flink Issue Type: Bug Components: Connectors / Pulsar Affects Versions: pulsar-4.2.0, pulsar-4.1.1 Environment: * flink 1.17 * pulsar client 3.0.0 * org.apache.flink:flink-connector-pulsar:4.1.0-1.17 (connector) Reporter: Yubiao Feng
- The unnecessary codes calls `pulsarClient.getLookup().getPartitionedTopicMetadata()` to create the partitioned topic metadata(in fact, this behavior of is not correct, explained [here](https://github.com/streamnative/eng-support-tickets/issues/1001#issuecomment-1969473868)) - 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)