Repository navigation
Closed
Labels
apibugSomething isn't workingcidependenciesdockeremailenhancementBuild on top of an already existing feature to mke it better.ocrpaymentperformancesecurity
Description
Problem
Kafka configurations are currently scattered across multiple disjointed packages:
brokers/kafka/config/(contains general Kafka consumer, producer, and topic configs)payment/common/events/(contains payment-specific Kafka configurations)coupon/kafka/(contains coupon bulk generation consumers)ocrprocessing/events/(contains OCR message listeners)elasticsearch/events/(contains ES index consumers)pushnotification/kafka/(contains notification message consumers)
This fragmentation makes it hard to manage shared serialization logic, properties, error recovery protocols, and performance tuning configurations. Changes to broker addresses or global serialization properties require updates in multiple packages.
Proposed Solution
Create a central top-level module com.xtraction.api.shared.kafka (or com.xtraction.api.brokers.kafka as a single source of truth) containing all Kafka core infrastructure configs. Feature modules should only contain their listener/producer service logic and should import or reference the core configurations.
User Stories
- As a DevOps engineer, I want all Kafka infrastructure configurations to live in one package so that I can easily configure clustering, security credentials, and performance parameters in a single place.
- As a developer, I want to write new Kafka producers and consumers without duplicating boilerplate configuration templates.
Acceptance Criteria
- Core Kafka beans (producer factories, container factories, common templates, and error handlers) are consolidated under
src/main/java/com/xtraction/api/shared/kafka/config/. - Duplicate configurations are removed from PaymentKafkaConsumerConfig.java.
- Feature modules depend on the core config module and do not define their own
ConsumerFactoryor listener factory unless strictly required for custom serialization formats.
Tasks
- Create package
com.xtraction.api.shared.kafka.config. - Migrate KafkaConsumerConfig.java and KafkaProducerConfig.java to the shared package.
- Update import statements across all event listeners.
Metadata
Metadata
Assignees
Labels
apibugSomething isn't workingcidependenciesdockeremailenhancementBuild on top of an already existing feature to mke it better.ocrpaymentperformancesecurity
Activity
aniebietafia commentedon Jun 21, 2026
Hi @coclock,
Thanks for your interest to work on this issue! However, please note that this repository is a Java / Spring Boot / Maven project, not a TypeScript or JavaScript project.
Because of this:
We do not have a package.json file or any npm dependencies.
The issue we are solving involves refactoring Java classes and package structures under src/main/java/com/xtraction/api/... (specifically consolidating Spring Kafka beans and updating import statements across event listener classes).
To help get you started on the right path, here is what a revised approach for this project should look like:
Refactor & Migrate: Move these files to the new target package com.xtraction.api.shared.kafka.config and consolidate duplicate configurations from PaymentKafkaConsumerConfig.java.
Please confirm from the docs for any relevant information that you might need.
Let me know if you have any questions about the Java setup or running Maven!"