This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
Consume failed in two cases : when using public/default username AND when using the "correct" username the tenant/namespace of the topic #1564
Labels
The bug description
While testing KoP as a kafka protocol handler for pulsar, I succeeded in producing messages to a partitioned topic
But failed in consuming the messages.
case 1
According to KoP docs, the username needed to be the tenant/namespace of the topic
But, when I used this username, the consumer keep been restarted, and eventually the session is closed.
case 2
I tried to use the username of public/default and the consumer succeeded to join the group but is not consuming any messages.
Bug conclusions
I assume that there is a problem with the compatiblity to kafka in group coordinator and group.id, over pulsar.
To Reproduce these cases
Building the cluster : 3 brokers, 3 bookies, 3 local zookeepers, and 3 global zookeepers. each instance runs on different machines.
Configuring KoP
messagingProtocols=kafka
protocolHandlerDirectory=./protocols
kafkaListeners=SASL_PLAINTEXT://<broker_hostname>:9092
saslAllowedMechanisms=PLAIN
allowAutoTopicCreationType=partitioned
Creating
tenant, namespace, partitioned topic, subscription, JWT, and giving consume produce roles
Writing the attached code using kafkajs
Expected behavior
Giving the tenant/namespace of the topic as the consumer username and succesfuly connect to the broker, join to the group and start consuming the messages in the topic
Brokers logs in case 1
ERROR io.streamnative.pulsar.handlers.kop.kafka RequestHandler - Caught error in the handler, closing channel
Add any other context about the problem here.
Logs Screenshots
kafkajs logs in case 1
![kafkajs logs](https://user-images.githubusercontent.com/55452243/201138890-b56dc3dd-ccc8-4964-b7d3-b7e8d16295a2.jpeg)
This logs repeating themself
kafkajs logs - case 2
![case 2 - kafkajs (2)](https://user-images.githubusercontent.com/55452243/201186696-3719236c-e983-47bb-b25e-c33adf8c0af1.jpeg)
The code
The text was updated successfully, but these errors were encountered: