diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java index 6d3c38319c80f..0a3526be354e0 100644 --- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java +++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_9/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java @@ -218,7 +218,6 @@ public void subscribe(List topics, ConsumerRebalanceListener callback) { consumerBuilder.subscriptionType(SubscriptionType.Failover); consumerBuilder.messageListener(this); consumerBuilder.subscriptionName(groupId); - consumerBuilder.topics(topics); if (numberOfPartitions > 1) { // Subscribe to each partition consumerBuilder.consumerName(ConsumerName.generateRandomName());