-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Implement Dev Services for Kafka #17468
Conversation
...t/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java
Show resolved
Hide resolved
...t/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java
Outdated
Show resolved
Hide resolved
...t/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java
Outdated
Show resolved
Hide resolved
...t/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java
Show resolved
Hide resolved
I don't know anything about Dev Services (particularly how state is supposed to be managed in the processor class), but other than that, this looks OK baring a few comments. |
750489a
to
6caf1a6
Compare
and pull requests should be submitted there: | ||
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc | ||
//// | ||
= Dev Services for Kafka |
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.
Does it really make sense to have a specific document just for that?
Not sure how it's organized for others but it feels a bit weird.
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.
I don't want to have it in the Kafka quickstart (which has a lot of extra content that needs to move). Dev Services and its configuration has nothing to do with the quickstart. When we will have a proper reference guide it will go there.
Having a Kafka reference guide is on my todo list.
Seems very similar to what we have for Mongo and Redis, so LGTM |
Should there be some template support for it as well ? As in the |
It can be complemented later for sure if it can be of interest |
Kafka DevServices! Great news!!!. Just a quick one, does this first release of Kafka DevServices support AVRO (a schema registry)? |
@pjgg it supports Avro, but would not start a schema registry. We would need to find a slim, fast to start schema registry first. |
@sberyozkin @geoand it looks similar but is not exactly the same. Kafka requires customizing the container to configure the advertised brokers. So, the docker/container part is slightly more convoluted (well, not the end of the world). |
Unrelated to this PR, but -- when we add extension(s) for Apicurio Registry (the Avro library will be first, but Protobuf will likely follow), we can add Dev Services support for schema registry. The Apicurio Registry is pretty fast to start (it's a Quarkus app after all! :-) ), so should be fine IMHO. |
@Ladicek ideally, we would have a "slim" container image that we can just run. |
Apicurio Registry has a container image with in-memory storage; I think we can easily use that: https://hub.docker.com/r/apicurio/apicurio-registry-mem/tags |
Awesome! Exactly what we need. |
Does it needs to access the Kafka broker (the dev services for kafka emits a build item with the bootstrap server, so we should be fine, but we will have to check) |
It doesn't need to access the Kafka broker -- not in the in-memory variant. They have Kafka-based storage as well, but I assume we wouldn't use that for dev services. |
Red Panda was picked for Dev Services. What if user wants to use the official image or Strimzi? Is the Kafka DevServices going to be customizable to allow Strimzi for example? |
...oyment/src/main/java/io/quarkus/kafka/client/deployment/KafkaDevServicesBuildTimeConfig.java
Outdated
Show resolved
Hide resolved
@rsvoboda at the moment it only supports red panda. We can add strimzi, but the experience was quite bad on my machine. Note that it's not just changing the image name, the whole startup script, kafka advertising, and so on need to be done for that one too. Hopefully, we would get images using Kraft. Don't forget that the user can still start its own cluster (strimzi or whatever he likes) and disables the dev services. |
6caf1a6
to
ca7f069
Compare
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 just realized that we have actually missed native support in this and some of the other dev services PRs. It's probably best to just merge this one and then fix them all together.
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.
Actually looks like it was added for the other ones, but is missing for this one, see io.quarkus.test.junit.NativeDevServicesHandler.
TBH I don't like that these are separate build items, they should be refactored to a single common one, it really just sets system properties so this could be simplified a lot I think.
#17574 is what I am talking about in terms of a generic build item. |
So basically producing one per "key"? |
BTW, Trying to rush the integration of NativeDevServicesHandler. I need this in 2.0 final. |
ca7f069
to
eefcee6
Compare
I've added the DevServicesNativeConfigResultBuildItem. |
@stuartwdouglas can you have a look? |
...t/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java
Show resolved
Hide resolved
...t/deployment/src/main/java/io/quarkus/kafka/client/deployment/DevServicesKafkaProcessor.java
Show resolved
Hide resolved
eefcee6
to
4481a1f
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 4481a1f
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 #📦 integration-tests/kafka-streams✖ |
Add support for Kafka as Dev Service.
It uses Red Panda as it's way faster (more than 20 seconds using the official image, ~ 15 seconds with Strimzi, less than 1 second with Red Panda).