Skip to content

Commit

Permalink
chore : polish
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli authored Apr 11, 2024
1 parent 1740a4d commit 426a4a5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
7 changes: 1 addition & 6 deletions kafka-reactor/boot-kafka-reactor-consumer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.projectreactor.kafka</groupId>
<artifactId>reactor-kafka</artifactId>
Expand Down Expand Up @@ -148,7 +143,7 @@
<configuration>
<java>
<palantirJavaFormat>
<version>2.30.0</version>
<version>2.40.0</version>
</palantirJavaFormat>
<importOrder/>
<removeUnusedImports/>
Expand Down
7 changes: 1 addition & 6 deletions kafka-reactor/boot-kafka-reactor-producer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.projectreactor.kafka</groupId>
<artifactId>reactor-kafka</artifactId>
Expand Down Expand Up @@ -110,7 +105,7 @@
<configuration>
<java>
<palantirJavaFormat>
<version>2.38.0</version>
<version>2.40.0</version>
</palantirJavaFormat>
<importOrder/>
<removeUnusedImports/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@EnableKafka
public class KafkaConfig implements KafkaListenerConfigurer {

private static final Logger logger = LoggerFactory.getLogger(KafkaConfig.class);
private static final Logger LOGGER = LoggerFactory.getLogger(KafkaConfig.class);

private final LocalValidatorFactoryBean validator;

Expand All @@ -30,7 +30,7 @@ public void configureKafkaListeners(KafkaListenerEndpointRegistrar registrar) {
@Bean
KafkaListenerErrorHandler validationErrorHandler() {
return (m, e) -> {
logger.error("Error for message :{} ", m, e);
LOGGER.error("Error for message :{} ", m, e);
return m;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void topicsWithPartitionsCount() throws Exception {
.andExpect(jsonPath("$[0].partitionCount").value(1))
.andExpect(jsonPath("$[0].replicationCount").value(1))
.andExpect(jsonPath("$[1].topicName").value("test_1"))
.andExpect(jsonPath("$[1].partitionCount").value(1))
.andExpect(jsonPath("$[1].partitionCount").value(32))
.andExpect(jsonPath("$[1].replicationCount").value(1))
.andExpect(jsonPath("$[2].topicName").value("test_2"))
.andExpect(jsonPath("$[2].partitionCount").value(1))
Expand All @@ -94,7 +94,7 @@ void topicsWithPartitionsCount() throws Exception {
.andExpect(jsonPath("$[5].partitionCount").value(1))
.andExpect(jsonPath("$[5].replicationCount").value(1))
.andExpect(jsonPath("$[6].topicName").value("test_3"))
.andExpect(jsonPath("$[6].partitionCount").value(1))
.andExpect(jsonPath("$[6].partitionCount").value(32))
.andExpect(jsonPath("$[6].replicationCount").value(1));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ public class TestBootKafkaSampleApplication {
@Bean
@ServiceConnection
KafkaContainer kafkaContainer() {
return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.0")).withKraft();
KafkaContainer kafkaContainer = new KafkaContainer(
DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.0"))
.withKraft();
kafkaContainer.addEnv("KAFKA_NUM_PARTITIONS", "32");
return kafkaContainer;
}

public static void main(String[] args) {
Expand Down

0 comments on commit 426a4a5

Please sign in to comment.