-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Kafka's ConsumerRebalanceListener #577
Comments
Can do give me a bit more details? Do you mean adding the ability to use a custom "poller" ? |
I finally understand... It's definitely something we should add. |
That's a good example. The Listener is always called in the first poll within the poll loop thread. It is also called whenever there's a rebalance which can be caused by an unhealthy consumer, but it can also be caused by adding/removing consumers as well as increase the number of partitions. One example I have is a kafka backed in memory cache. The topic has a retention period but I don't want to wait for kafka to clean up the partitions. I also don't want my warm up to take too long loading up from earliest since it definitely will have data that is too old. I can use a rebalance to do an offset by timestamp look up (there's an index in kafka for that) and then set the offsets accordingly. |
It should be rather simple to integrate. |
So, I was thinking to integrate it as follow:
@pcasaes fancy a PR? I can guide you. |
Sounds good. I'll give it a shot. |
Thanks @pcasaes, don't hesitate to ping me if you have any questions. |
Contains fixes for: * smallrye/smallrye-reactive-messaging#577 * smallrye/smallrye-reactive-messaging#556 * smallrye/smallrye-reactive-messaging#555 * smallrye/smallrye-reactive-messaging#471 * smallrye/smallrye-reactive-messaging#491 * quarkusio#9447 * Parts of quarkusio#9263 * quarkusio#8177 * quarkusio#7404 * quarkusio#7580
Contains fixes for: * smallrye/smallrye-reactive-messaging#577 * smallrye/smallrye-reactive-messaging#556 * smallrye/smallrye-reactive-messaging#555 * smallrye/smallrye-reactive-messaging#471 * smallrye/smallrye-reactive-messaging#491 * quarkusio#9447 * Parts of quarkusio#9263 * quarkusio#8177 * quarkusio#7404 * quarkusio#7580
Contains fixes for: * smallrye/smallrye-reactive-messaging#577 * smallrye/smallrye-reactive-messaging#556 * smallrye/smallrye-reactive-messaging#555 * smallrye/smallrye-reactive-messaging#471 * smallrye/smallrye-reactive-messaging#491 * quarkusio#9447 * Parts of quarkusio#9263 * quarkusio#8177 * quarkusio#7404 * quarkusio#7580
Sometimes earliest and latest don't quite cut it, not to mention some interesting deliver exactly once cases as described in the Kafka: The Definitive Guide. There would be a fait bit of work cut out though. From what I can understand from the code subscription is started during configuration. The listener would have to be registered before subscription somehow. Fortunately Vert.x' Kafka client implementation already has support for this.
The text was updated successfully, but these errors were encountered: