codelipenghui commented on issue #21042:
URL: https://github.com/apache/pulsar/issues/21042#issuecomment-1701947897

   @alpreu 
   
   > @codelipenghui Yes, but don't you think the behavior should be consistent? 
I think it is weird that non-persistent topics can be listed using 
list-partitioned-topics but not using list-topics
   
   Yes, I agree with you. From the implementation's perspective, the broker 
doesn't want to have a znode for a non-persistent topic/partition. But from the 
user's perspective, it should be consistent.
   
   It should list:
   
   1. Active topics (have producers or consumers)
   2. Inactive persistent topics
   3. Inactive non-persistent partitions --> the problem
   4. Don't list inactive non-persistent topics (non-partitioned topics)
   
   For the last one, the topic has been deleted if no active producers and 
consumers.
   For the 3rd one, we can fix it by generating the partition name by listing 
the partitioned topic metadata.
   
   > Should the output of get-partitioned-topic-metadata not show delete: true 
in this case?
   
   For now, you can try to set 
`brokerDeleteInactivePartitionedTopicMetadataEnabled=true` in broker.conf.
   It's also not a good user experience. It should be enabled by default if 
users enable topic auto-creation and inactive topic deletion. I think maybe it 
was worried about breaking the existing behavior before


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to