-
Notifications
You must be signed in to change notification settings - Fork 21
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 SSL to Kstreams and reactive Kafka #237
Conversation
c6e2de5
to
21d16d9
Compare
012-quarkus-kafka-streams/src/test/java/io/quarkus/qe/SslAlertMonitorIT.java
Outdated
Show resolved
Hide resolved
012-quarkus-kafka-streams/src/test/java/io/quarkus/qe/CommonsTest.java
Outdated
Show resolved
Hide resolved
import org.jboss.logging.Logger; | ||
import org.testcontainers.containers.GenericContainer; | ||
|
||
public class KafkaContainerHelper<SELF extends GenericContainer<SELF>> extends GenericContainer<SELF> { |
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 think this is a helper, but an extension to the Strimzi Kafka container. A proper name could be BaseStrimziKafkaContainer
.
Being said that, do we need this class? From my point of view, we don't need to check the compatible kafka versions and the doStart method could be done in the security implementations (it's just about to duplicate a single line).
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.
We have removed this class, because currently, we support up to Kafka 2.7.0. What we were doing was pickup the latest supported version by kafka test containers.
|
||
mp.messaging.incoming.slow.connector=smallrye-kafka | ||
mp.messaging.incoming.slow.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer | ||
|
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.
Why do we have these properties in 012?
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.
needed by KafkaGratefulShutdownTest
|
||
mp.messaging.incoming.slow.connector=smallrye-kafka | ||
mp.messaging.incoming.slow.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer | ||
|
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.
Why do we have these properties in 012?
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.
needed by KafkaGratefulShutdownTest
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.
It failed for me when running the NativeSslAlertMonitorIT test in Native:
mvn clean verify -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=4g
Failed with:
[INFO] Running io.quarkus.qe.NativeSslAlertMonitorIT
Executing [/home/jcarvaja/sources/beefy-scenarios/012-quarkus-kafka-streams/target/012-quarkus-kafka-streams-1.0.0-SNAPSHOT-runner, -Dquarkus.http.port=8081, -Dquarkus.http.ssl-port=8444, -Dtest.url=http://localhost:8081, -Dquarkus.log.file.path=/home/jcarvaja/sources/beefy-scenarios/012-quarkus-kafka-streams/target/quarkus.log, -Dquarkus.log.file.enable=true, -Dquarkus.profile=test, -Dquarkus.kafka-streams.ssl.endpoint-identification-algorithm=, -Dkafka.ssl.truststore.password=top-secret, -Dkafka.bootstrap.servers=SSL://localhost:32772, -Dkafka.security.protocol=SSL, -Dkafka.ssl.truststore.type=PKCS12, -Dkafka.ssl.truststore.location=/home/jcarvaja/sources/beefy-scenarios/012-quarkus-kafka-streams/src/main/resources/kafka-truststore.p12, -Dquarkus.kafka-streams.bootstrap-servers=SSL://localhost:32772]
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2021-07-19 07:49:33,936 ERROR [io.qua.run.Application] (main) Failed to start application (with profile test): java.lang.ClassNotFoundException: java.lang.Integer
at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:64)
at java.lang.Class.forName(DynamicHub.java:1308)
at io.quarkus.arc.runtime.ConfigRecorder.load(ConfigRecorder.java:102)
at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:48)
at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigProperties1249763973.deploy_0(ConfigBuildStep$validateConfigProperties1249763973.zig:380)
at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigProperties1249763973.deploy(ConfigBuildStep$validateConfigProperties1249763973.zig:40)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:612)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:101)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
Trying to run the same test using 2.0.0.Final
worked fine, so I guess this must be an issue happening since 2.1.0.CR1
and unreleased upstream version (999-SNAPSHOT). Can you confirm and report it if so?
I've seen the same issue in another module, so I reported this issue myself: quarkusio/quarkus#18814 |
The issue has been fixed and I've confirmed that this module is now working fine. Merging. |
Depends on: #239
Module: 012-quarkus-kafka-streams
All current tests are running under a secured Kafka by SSL.
Kafka streams pipeline is configured by
quarkus.kafka-streams.ssl
prefix property, but reactive Kafka producer/consumer is configured bykafka
prefix as you can see onSslStrimziKafkaTestResource
Tested locally on native mode.