-
Notifications
You must be signed in to change notification settings - Fork 119
[BUG] A topic created by the pulsar-flink connector is always created as a partitioned topic with 1 partition #398
Comments
When the pulsar broker is configured to automatically create partitions, the flink-pulsar don't create topic with partition = 1. If the switch is on
However, flink needs to ensure that all configured topics exist, so it create the topic with the default partition of 1 when pulsar not config autoTopicCreate. |
Even if allowAutoTopicCreation is set to true, this call will not trigger pulsar to automatically create the topic :
the admin API will only returns "Topic not exist" but without creating the topic. You can easily reproduce it with a Pulsar deployed with the default configuration :
Try this with pulsar-admin :
it will only answer "Topic not exist", and no topic created. So this code will always create a partioned topic with 1 partition if the topic doesn't exist (ignoring Pulsar broker configuration) :
|
Sorry, I confirmed the implementation of pulsar, ( The switch to automatically create topic is exposed in the pulsar interface, but admin api is not exposed. We can provide an issue to pulsar. |
@jianyun8023 @syhily Can you help me review the way to solve the problem? |
@shibd @jianyun8023 Since the MR for pulsar is too slow to be merged. I think we may need a workaround on the connector side. |
I think connector need support configuring the default number of partitions.(interim measures) |
Describe the bug
Since #369 when a topic is created by the flink-connector at the start-up of the stream (if the topic doesn't already exist), the topic is always created as a partioned topic with 1 partition.
To Reproduce
Expected behavior
Ideally the topic created should respect Pulsar configuration for auto topic creation (as defined by the Pulsar parameters : allowAutoTopicCreationType and defaultNumPartitions).
If it's not possible, the source/sink should be configurable to define the 2 points (partitioned or not and if partitioned, the default partitions number).
Additional context
Tested with :
The text was updated successfully, but these errors were encountered: