[ https://issues.apache.org/jira/browse/FLINK-31371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enzo Dechaene updated FLINK-31371: ---------------------------------- Priority: Not a Priority (was: Major) > Support subscribing non-existed topics in Pulsar source > ------------------------------------------------------- > > Key: FLINK-31371 > URL: https://issues.apache.org/jira/browse/FLINK-31371 > Project: Flink > Issue Type: New Feature > Components: Connectors / Pulsar > Affects Versions: 1.15.3 > Reporter: Enzo Dechaene > Assignee: Yufan Sheng > Priority: Not a Priority > > *Describe the bug* > With a Pulsar 2.8.4 server, a Flink stream containing Pulsar sources or sinks > will fail at startup if the topic doesn't exist. > > *To Reproduce* > Create a stream with : > * Flink 1.15.2 > * Pulsar 2.8.4 > * with a Pulsar source or sink linked to a non existant topic > * Start the stream > > *Expected behavior* > If the topic doesn't exist, it should be created at the first connection of > the source or sink without error. > > *Additional context* > In the TopicListSubscriber class of the connector, the method > getSubscribedTopicPartitions() try to get the metadata of a topic by doing > that : > > {code:java} > TopicMetadata metadata = queryTopicMetadata(pulsarAdmin, topic);{code} > > If the topic doesn't exist, I get a NullPointerException on the metadata > We created a previous > [ticket|https://github.com/streamnative/pulsar-flink/issues/366] on the > Pulsar connector and it was fixed -- This message was sent by Atlassian Jira (v8.20.10#820010)