Processor Common Library Module
Shared business logic, models, and utilities for all czz-to-erp-processor modules.
Purpose
This JAR library provides: - Entity configuration registry - Message processing services - HTTP client for ERP communication - Error tracking and reporting - Serialization/deserialization utilities - Common models and interfaces
Note: JAR library module - not executable on its own.
Key Components
Entity Registry
Centralizes entity configuration from entities-config.yml:
- Entity types and names
- Service bean mappings
- Database mapper configurations
- ERP endpoint paths
- Messaging configuration (topics, DLQ topics)
- Scheduler configuration (cron expressions)
Messaging Architecture
-
Publishing interface for sending messages to different messaging systems
-
Dynamic scheduler for database polling with configurable cron schedules per entity
-
Base consumer implementation with built-in retry logic and error handling
-
Consumer activation is optional and configurable per application
Message Processing Services
Business logic for processing each entity type: - Ticket processing - Cash journal processing
HTTP Client
Handles communication with external ERP systems: - Configurable endpoint, authentication - JSON/XML format support - Error handling and retries
Entities Configuration
The entities configuration is loaded from entities-config.yml.
czz-to-erp:
entities:
- type: tickets
name: Tickets
service-bean: czzToErpTicketService
topic: czz-to-erp-tickets
dlqTopic: czz-to-erp-tickets-dlq
schedulerCron: "0 */5 * * * *"
schedulerEnabled: true
- type: cashjournal
name: CashJournal
service-bean: czzToErpCashJournalService
topic: czz-to-erp-cashjournal
dlqTopic: czz-to-erp-cashjournal-dlq
schedulerCron: "0 */10 * * * *"
schedulerEnabled: true
Defines supported entities types and maps them to processing service beans.