-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add support for Apache Kafka native image #8993
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
0348388
to
e735b4e
Compare
Hi @eddumelendez do you know when a new |
I'm planning to release it next week. In the meantime you can use |
Won't I need the new release to avoid an exception? I tried this out and hit:
|
I have updated my previous answer. You don't need a new release if you do so. Look at Image Name Substitution |
Hi Eddu and Dave, I am directly using without image substitution. However, I am still facing the error Dave shared above. Thanks. |
Hi @prabhamanepalli, this has not been released yet. So, the substitution should be done. This change will be part of the next release and could be used without image substitution. |
Hi, I am testing with Spring boot the new native image and using latest version fo testcontainers 1.20.1: //private static final String kafkaVersion = "confluentinc/cp-kafka:7.7.0";
private static final String kafkaVersion = "apache/kafka-native:3.8.0";
private static Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(logger);
@Bean
@ServiceConnection
KafkaContainer kafkaContainer() {
logger.info("Creating Kafka Broker");
var imageName = DockerImageName.parse(kafkaVersion).asCompatibleSubstituteFor("confluentinc/cp-kafka");
return new KafkaContainer(imageName).withLogConsumer(logConsumer);
} but I am receiving the following error:
If I don´t put the compability option: .asCompatibleSubstituteFor("confluentinc/cp-kafka") I receive:
How to solve this issue? |
Hi, you are using |
Many thanks @eddumelendez, now it is working the example but not using Service Connection:
To run the test, I used the previous approach: public class KafkaContainerInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {
...
} The question that I have is why not use the same annotation for all kafka containers:
BTW, the performance improvement is huge :) Juan Antonio |
@jabrena this is expected because
You can take a look at each implementation and those handle different things, env vars or configuration files, in order to set it up correctly. |
@eddumelendez it is clear for me. Great job 😊 |
No description provided.