rust-rdkafka
rust-rdkafka copied to clipboard
Add member assignments parsing
Hi, @messense, thanks for the PR! I'm afraid I don't think that this Rust wrapper of librdkafka is the correct place for this code. It seems like something that would be better handled by librdkafka itself. I've opened https://github.com/edenhill/librdkafka/issues/2643 to discuss.
I'm going to hold off on reviewing this PR until upstream responds!
Hi @messense, sorry for the long delay. It looks like upstream, sadly, does not want to maintain this code, so I suppose we can take it here. It will need a test, though. If you can provide one, that would be great. Otherwise I'll try to get to it myself eventually.
Hi, do you still plan to merge this PR? It would be awesome to be able to access the topics consumed by a group
Merging this PR is blocked on someone having time to write a test. If you are up for it, that would be great.
I started playing with rust a few weeks ago so I'm not feeling 100% confident about this. I'll give it a try and see what comes out of it. For the time being I can confirm that the proposed solution works as expected :+1:
Hi, I expanded the test_group_membership
test with this:
assert_eq!(consumer_member.assignment().unwrap().len(), 1);
let assignment_topic = &consumer_member.assignment().unwrap()[0];
assert_eq!(
assignment_topic,
&MemberAssignment {
partitions: vec![0, 1, 2],
topic: topic_name
}
);
I hope it's enough, if it is how should I proceed? I don't have permissions to push on this branch, should I fork the fork and open another one?
Yeah, that's probably good enough! A new PR sounds good.