ethanlin01x opened a new pull request, #3995: URL: https://github.com/apache/iggy/pull/3995
## Which issue does this PR address? Relates to #3877 ## Rationale The C++ SDK already let the caller name a consumer, but as a kind string paired with an identifier. Nothing checked that pair until it reached Rust, and the "let the server pick the partition" sentinel had no name at all. ## What changed? `poll_messages` and the three consumer-offset calls took `consumer_kind: String`, `consumer_id: Identifier`. A typo such as "`consumer_grp`" compiled fine and failed at runtime, and `ConsumerKind::ConsumerGroup` was reachable only by spelling the kind correctly. They now take a single `Consumer` carrying a `ConsumerKind` enum, so the kind is checked where the call is written. `iggy::Consumer::Single(id)` and `iggy::Consumer::Group(id) `build it from either a name or a number, mirroring how TopicOption builds its entries. `iggy::kAnyPartitionId` gives the `u32::MAX `partition sentinel a name and documents what each call does with it: a group poll reads one of the partitions assigned to the polling member, a regular poll and get_consumer_offset read partition 0, and the two offset writes reject it. The bridge already used the name Consumer for the placeholder wrapping the high-level consumer, so that one is renamed `IggyConsumer`, matching the Rust SDK. ### Breaking change: the four calls replace their consumer_kind and consumer_id arguments with a single consumer. ## Local Execution - Passed - Pre-commit hooks ran ## AI Usage If AI tools were used, please answer: 1. Which tools? Claude code 2. Scope of usage? Analysis and implementation 3. How did you verify the generated code works correctly? Local run 4. Can you explain every line of the code if asked? Yes. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
