Skip to content

Commit

Permalink
Revert "feat : migrate to use official apache kafka image"
Browse files Browse the repository at this point in the history
This reverts commit 4c63b48.
  • Loading branch information
rajadilipkolli committed Jun 26, 2024
1 parent 4c63b48 commit be1b9f9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Licensed under MIT License Copyright (c) 2023-2024 Raja Kolli.
import org.springframework.context.annotation.Bean;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.KafkaContainer;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.kafka.KafkaContainer;
import org.testcontainers.utility.DockerImageName;

@TestConfiguration(proxyBeanMethods = false)
Expand All @@ -37,7 +37,8 @@ PostgreSQLContainer<?> postgreSqlContainer() {
@ServiceConnection
KafkaContainer kafkaContainer(DynamicPropertyRegistry dynamicPropertyRegistry) {
KafkaContainer kafkaContainer =
new KafkaContainer(DockerImageName.parse("apache/kafka").withTag("3.7.0"))
new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.0"))
.withKraft()
.withReuse(true);
dynamicPropertyRegistry.add(
"spring.cloud.stream.kafka.binder.brokers", kafkaContainer::getBootstrapServers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Licensed under MIT License Copyright (c) 2023-2024 Raja Kolli.
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.kafka.KafkaContainer;
import org.testcontainers.containers.KafkaContainer;
import org.testcontainers.utility.DockerImageName;

@TestConfiguration(proxyBeanMethods = false)
Expand All @@ -31,7 +31,8 @@ GenericContainer<?> zipkContainer() {
@Bean
@ServiceConnection
KafkaContainer kafkaContainer() {
return new KafkaContainer(DockerImageName.parse("apache/kafka").withTag("3.7.0"))
return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.0"))
.withKraft()
.withReuse(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Licensed under MIT License Copyright (c) 2023-2024 Raja Kolli.
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.context.annotation.Bean;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.kafka.KafkaContainer;
import org.testcontainers.containers.KafkaContainer;
import org.testcontainers.utility.DockerImageName;

@TestConfiguration(proxyBeanMethods = false)
Expand All @@ -26,7 +26,8 @@ public class TestOrderServiceApplication {
@ServiceConnection
@RestartScope
KafkaContainer kafkaContainer() {
return new KafkaContainer(DockerImageName.parse("apache/kafka").withTag("3.7.0"))
return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.0"))
.withKraft()
.withReuse(true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
import org.springframework.context.annotation.Bean;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.KafkaContainer;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.kafka.KafkaContainer;
import org.testcontainers.utility.DockerImageName;

@TestConfiguration(proxyBeanMethods = false)
Expand All @@ -31,7 +31,8 @@ GenericContainer<?> zipkContainer() {
@Bean
@ServiceConnection
KafkaContainer kafkaContainer() {
return new KafkaContainer(DockerImageName.parse("apache/kafka").withTag("3.7.0"))
return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.0"))
.withKraft()
.withReuse(true);
}

Expand Down

0 comments on commit be1b9f9

Please sign in to comment.