fantapsody commented on issue #3733: support Pattern subscribe in kafka compat client URL: https://github.com/apache/pulsar/issues/3733#issuecomment-583332354 There seems to be a few problems in the current implementations of kafka compact clients, I'm not sure if they have been reported: 1. `KafkaConsumer` states its `subscribe` methods are not incremental, which means new subscriptions will replace the old ones. However, implementions in PulsarKafkaConsumer are not, and seem to create dangling consumers if re-subscribe to the same topics. https://github.com/apache/kafka/blob/f698f3f8401845e0f73b104c0f96c54d2851b67a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java#L957 https://github.com/apache/pulsar/blob/54b39e64f361a2ed5242259e04505bcfc66c1c8a/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java#L267 2. `ConsumerRebalanceListener.onPartitionsAssigned` should be called when the partition becomes active. 3. Methods in `PulsarKafkaConsumer` are not totally thread safe, although concurrent collections are used.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
