You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pulsar.apache.org by Apache Pulsar Slack <ap...@gmail.com> on 2019/12/26 09:11:03 UTC

Slack digest for #general - 2019-12-26

2019-12-25 19:38:17 UTC - Ruian: @Ruian has joined the channel
----
2019-12-25 19:52:29 UTC - Ruian: Hi, I'm try to use the pulsar-client-kafka wrapper.
But these lines looks weird to me: <https://github.com/apache/pulsar/blob/master/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java#L262-L268>
How can I use `TopicPartition` related APIs, such as `void seek(TopicPartition partition, long offset)`, while subscribed `TopicPartition`s are private inside the wrapper?
----
2019-12-26 00:18:58 UTC - Sijie Guo: Not sure if I understand your question. But you can call `seeek(TopicPartition parrtition, long offset)` at the kafka consumer after subscribed. <https://github.com/apache/pulsar/blob/master/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java#L544>
----
2019-12-26 01:44:56 UTC - Ruian: Oh, I mean APIs, such as `void seek(TopicPartition partition, long offset)`, require a subscribed `TopicPartition` as an input parameter.
However, after calling the wrapper's `subscribe` , it seems that there is no public methods to get the subscribed `TopicPartition`s from the wrapper.
----
2019-12-26 02:50:19 UTC - Sijie Guo: How did you do in Kafka?
----
2019-12-26 03:18:14 UTC - Ruian: ```partitionsFor```

----
2019-12-26 03:19:20 UTC - Ruian: I think I can use the `partitionsFor` to build `TopicPartition`
----
2019-12-26 03:22:10 UTC - Ruian: Maybe the wrapper can support the `partitionsFor`? by using something like this? <https://github.com/apache/pulsar/blob/master/pulsar-client-kafka-compat/pulsar-client-kafka/src/main/java/org/apache/kafka/clients/consumer/PulsarKafkaConsumer.java#L248>
----
2019-12-26 08:29:11 UTC - Laran Evans: @Laran Evans has joined the channel
----
2019-12-26 08:30:30 UTC - Laran Evans: Hi Pulsar :slightly_smiling_face:
----
2019-12-26 09:06:39 UTC - Himanshu Singh: @Sijie Guo Were you able to find any issue with the commands that I have used? I am actually confused with the concept of cluster here.
----