Parent
#1 — Migrate domain event bus from RabbitMQ to Kafka
What to build
Full consumer path: messages on the "course.created" Kafka topic are consumed, deserialized, and delivered to the IncrementCoursesCounterOnCourseCreated application service.
The DomainEventKafkaDeserializer uses the Jackson mix-in to resolve the concrete domain event class from the envelope type field — no reflection, no fromPrimitives(), no classpath scanning.
A CourseCreatedKafkaConsumer infrastructure class with @KafkaListener(topics = "course.created") receives the deserialized event and delegates to the application service via direct constructor injection.
All old consumer infrastructure is deleted: RabbitMQ consumer, auto-starter, reflection-based serializer/deserializer, DomainEventsInformation, DomainEventSubscribersInformation, DomainEventSubscriberInformation.
The IncrementCoursesCounterOnCourseCreated application service is cleaned up: @EventListener annotation removed.
Acceptance criteria
Blocked by
Parent
#1 — Migrate domain event bus from RabbitMQ to Kafka
What to build
Full consumer path: messages on the
"course.created"Kafka topic are consumed, deserialized, and delivered to theIncrementCoursesCounterOnCourseCreatedapplication service.The
DomainEventKafkaDeserializeruses the Jackson mix-in to resolve the concrete domain event class from the envelopetypefield — no reflection, nofromPrimitives(), no classpath scanning.A
CourseCreatedKafkaConsumerinfrastructure class with@KafkaListener(topics = "course.created")receives the deserialized event and delegates to the application service via direct constructor injection.All old consumer infrastructure is deleted: RabbitMQ consumer, auto-starter, reflection-based serializer/deserializer,
DomainEventsInformation,DomainEventSubscribersInformation,DomainEventSubscriberInformation.The
IncrementCoursesCounterOnCourseCreatedapplication service is cleaned up:@EventListenerannotation removed.Acceptance criteria
KafkaEventBus→ consumer deserializes →IncrementCoursesCounterOnCourseCreated.on()is invokedDomainEventKafkaDeserializerunit test proves round-trip (serialize → deserialize → equal event)CourseCreatedKafkaConsumerunit test proves the application service is called with the correctCourseCreatedDomainEventRabbitMqDomainEventsConsumer,RabbitMqConsumerAutoStarterdeletedDomainEventJsonSerializer,DomainEventJsonDeserializerdeletedDomainEventsInformation,DomainEventSubscribersInformation,DomainEventSubscriberInformationdeletedIncrementCoursesCounterOnCourseCreatedhas no@EventListenerannotationspring-rabbit-testandorg.testcontainers:rabbitmqremoved frombuild.gradleBlocked by