-
Notifications
You must be signed in to change notification settings - Fork 119
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
Replace Vert.x Kafka client with native Java Kafka client in the sink endpoint #734
Replace Vert.x Kafka client with native Java Kafka client in the sink endpoint #734
Conversation
Signed-off-by: Paolo Patierno <[email protected]>
Signed-off-by: Paolo Patierno <[email protected]>
Signed-off-by: Paolo Patierno <[email protected]>
Signed-off-by: Paolo Patierno <[email protected]>
Signed-off-by: Paolo Patierno <[email protected]>
src/main/java/io/strimzi/kafka/bridge/NoopPartitionsRebalance.java
Outdated
Show resolved
Hide resolved
src/main/java/io/strimzi/kafka/bridge/http/HttpSinkBridgeEndpoint.java
Outdated
Show resolved
Hide resolved
src/main/java/io/strimzi/kafka/bridge/http/HttpSinkBridgeEndpoint.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Paolo Patierno <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I only run through it quickly ... should be probably also reviewed by Tom ;-)
Thanks @scholzj ... yeah Tom already had a first pass. @tombentley I addressed your comments, any more feedback on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few nits, but otherwise LGTM.
src/main/java/io/strimzi/kafka/bridge/http/HttpSinkBridgeEndpoint.java
Outdated
Show resolved
Hide resolved
src/main/java/io/strimzi/kafka/bridge/http/HttpSinkBridgeEndpoint.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Paolo Patierno <[email protected]>
This PR is about replacing the usage of the Vert.x Kafka client on the sink endpoint (consumer side of the bridge) with the native Java Kafka client (provided by Apache Kafka upstream project).
It provides the following things:
CompletableFuture
(s) based pattern to run consumer requests asynchronously (as today it's done by Vert.x)As additional note, I decided to start the async operations (via
CompletableFuture.runAsync
and similar) in the higher level classHttpSinkBridgeEndpoint
because, as already raised by Tom in the producer side, we could end at some point to remove theSinkBridgeEndpoint
class, having just one. This is also the same behaviour as the producer/source endpoint.Anyway, there are still some Vert.x structures in place like the ones handling JSON, Buffer(s) and Handler(s).