Blizzard / node-rdkafka

Node.js bindings for librdkafka
MIT License
2.1k stars 391 forks source link

Cooperative Rebalance Question / Implementation Help Needed #964

Closed robinfehr closed 2 years ago

robinfehr commented 2 years ago

Hi,

I’m currently implementing the cooperative incremental rebalances (or what's missing here: https://github.com/Blizzard/node-rdkafka/pull/907)

I’ve added all the missing e2e tests and the assignment_lost fn.

The last step I’m currently struggling with is testing the assignment_lost fn.

I would like to write an E2E test that returns true for assignment_lost. I’ve tried to mimic this test as an E2E test in JS: /deps/librdkafka/tests/0113-cooperative_rebalance.cpp:1673

But fail to get a rebalance when I delete a topic thus won’t ever reach a return value that is true. (revoke never makes it into the consumer)

How would you test the assignment_lost fn? Would you take a different approach? I tried a lot of options already and seem to be a bit stuck.

This is the current one i have that won't trigger the rebalance: https://gist.github.com/robinfehr/941611f2b94c164ba087149961fad127

Your help would be much appreciated.

robinfehr commented 2 years ago

Can be closed. the only thing missing was

      'topic.metadata.refresh.interval.ms': 3000