vert-x3 / vertx-kafka-client

Reactive Kafka Client for Vert.x
Apache License 2.0
84 stars 82 forks source link

endOffsets(Set<TopicPartition> topicPartitions) annotated with @GenIgnore #237

Closed gkozyryatskyy closed 10 months ago

gkozyryatskyy commented 1 year ago

Questions

According to this comment https://github.com/smallrye/smallrye-mutiny-vertx-bindings/issues/724#issuecomment-1491356428 endOffsets(Set<TopicPartition> topicPartitions) method is annotated with @GenIgnore so smallrye-mutiny-vertx-bindings lib do not see this method during the generation.

Here is the link to latest tag source https://github.com/vert-x3/vertx-kafka-client/blob/4.4.1/src/main/java/io/vertx/kafka/client/consumer/KafkaConsumer.java#L837

Version

vertx-kafka-client:4.3.7

tsegismont commented 1 year ago

It is mandatory currently due to a limitation of Vert.x codegen

As a workaround, you can do this:

Future<Map<TopicPartition, Long>> future = mutinyConsumer.getDelegate().endOffsets(topicPartitions);
Uni<Map<TopicPartition, Long>> uni = io.smallrye.mutiny.vertx.UniHelper.toUni(future);
gkozyryatskyy commented 1 year ago

@tsegismont Understand you. As a workaround im already using something close, of what you proposed.

Thank you for the reply!