forked from apache/pulsar-adapters
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Motivation KafkaApiTest is failing ### Modifications 1. conversion between Pulsar topic name and Kafka TopicPartition ended up with TopicPartition using name with "-partition-<partition idx>" 2. Seek was not working correctly: PulsarKafkaConsumer seeks to beginning, as asked. Clears lastReceivedOffset in the process. on poll it checks ``` if (lastReceivedOffset.get(tp) == null && !unpolledPartitions.contains(tp)) { log.info("When polling offsets, invalid offsets were detected. Resetting topic partition {}", tp); resetOffsets(tp); } ``` seek didn't update unpolledPartitions - reset offset uses default strategy to reset => seeks to the end ### Verifying this change - [ ] Make sure that the change passes the CI checks. *(Please pick either of the following options)* This change is already covered by existing tests, such as KafkaApiTest. ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* No ### Documentation - Does this pull request introduce a new feature? NO
- Loading branch information
Showing
3 changed files
with
44 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters