Skip to content
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

Dataplane migration for Apache Kafka communications: From Vert.x to Project Loom #2928

Open
matzew opened this issue Jan 26, 2023 · 2 comments
Labels
area/broker Kafka Broker related issues area/channel Kafka Channel related issues area/data-plane area/sink KafkaSink related issues area/source Kafka Source related issues kind/feature-request triage/accepted Issues which should be fixed (post-triage)

Comments

@matzew
Copy link
Contributor

matzew commented Jan 26, 2023

Problem

The Knative Broker's data-plane communication with Apache Kafka for consuming and producing records is currently done via the Vertx Kafka client library (see [1]). The libary is basically a wrapper for communications with Apache Kafka inside of the vertx threading model.

The project requires an evaluation the OpenJDK 19 "Project Loom" ([2], [3]) itself and how to leverage it for efficient communications with an Apache Kafka cluster.

The goal of the project is to migrate the usage of vert.x for any communications with Apache Kafka to pure OpenJDK 19's Loom, and reduce the number of 3rd party frameworks, such as vert.x for Apache Kafka communication.

Exit Criteria

A Knative Kafka Broker data plane implementation working on Java 19, leveraging the Project Loom APIs while communicating with Apache Kafka. No usage of the vertx-kafka-client, since all Kafka communications are done via Loom.

Additional context (optional)

[1] https://github.com/vert-x3/vertx-kafka-client
[2] https://wiki.openjdk.org/display/loom
[3] https://openjdk.org/projects/jdk/19/

@matzew matzew added kind/feature-request area/data-plane triage/accepted Issues which should be fixed (post-triage) area/broker Kafka Broker related issues area/channel Kafka Channel related issues area/sink KafkaSink related issues area/source Kafka Source related issues labels Jan 26, 2023
@ppatierno
Copy link

ppatierno commented Jan 26, 2023

I am not sure what do you mean by all Kafka communications are done via Loom, how do you envisage the usage of virtual threads as a replacement for the Vert.x Kafka client? I mean, isn't it something you can already do without Loom.

This is something we have already done in our Strimzi HTTP bridge, moving to the usage of CompletableFuture(s) to run the async Kafka communication.
Following a couple of PRs where it was made replacing the producer (called source endpoint) and consumer (called sink endpoint):

strimzi/strimzi-kafka-bridge#724
strimzi/strimzi-kafka-bridge#734

@debasishbsws
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker Kafka Broker related issues area/channel Kafka Channel related issues area/data-plane area/sink KafkaSink related issues area/source Kafka Source related issues kind/feature-request triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

3 participants