I'm using Axon version (4.3) which seamlessly supports Kafka with annotation in the SpringBoot Main class using
@SpringBootApplication(exclude = org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration.class)
In my case the message is sotred in the topic successfully, but the problem with this consumer, i can't consume the message from the topic.
y a-t-il une configuration manquante?
<dependency>
<groupId>org.axonframework</groupId>
<artifactId>axon-spring-boot-starter</artifactId>
<version>4.3</version>
<exclusions>
<exclusion>
<groupId>org.axonframework</groupId>
<artifactId>axon-server-connector</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.axonframework.extensions.kafka</groupId>
<artifactId>axon-kafka-spring-boot-starter</artifactId>
<version>4.0-RC3</version>
</dependency>
application.yml
axon:
eventhandling:
processors:
conventions:
source: kafkaMessageSource
mode: tracking
serializer:
general: jackson
kafka:
client-id: consumer_service
default-topic: topic_x
bootstrap-servers:
- 127.0.0.1:9092
Listener.java
//@Component
@ProcessingGroup(value = "conventions")
public class Listener {
private static final Logger LOGGER = LoggerFactory.getLogger(GenericListener.class);
@EventHandler
void on(ConventionCreatedEvent event) {
LOGGER.info("got the event {}", event);
}
}