From ERP to CZZ
Integration platform for connecting external ERP systems with comerzzia.
Overview
The ERP to CZZ integration consists of two main components:
-
Input Layer: REST API gateway for receiving ERP data
-
Processor Layer: Message processing and comerzzia database integration
Architecture
The integration follows a message-driven architecture where data flows from external ERP systems through the Input layer, which validates and publishes messages to a message broker (Kafka or Pub/Sub), and then the Processor layer consumes these messages to update the comerzzia database.
Observability / health check
-
Spring Boot Actuator
-
Health checks, metrics, and application info endpoints
-
Prometheus metrics export via
/actuator/prometheus
-
-
Monitor-UI embedded
-
JSON metrics available via
/monitor/metrics
-
Business Metrics (Prometheus)
Micrometer converts . to _ and appends _total to counters. Names below are the exact Prometheus metric names. For counters, use rate(metric[5m]) or increase(metric[5m]) in PromQL, not the raw value.
|
Global Counters — type: counter
| Prometheus metric | Description | Incremented by |
|---|---|---|
|
Messages received for processing |
REST API / Folder: on message received |
|
Messages processed successfully |
REST API / Folder: on success |
|
Messages failed |
REST API / Folder: on error |
|
Messages sent to error topic |
Processor: on DLQ send |
|
Total retries performed |
Processor: on retry result |
|
Retries that eventually succeeded |
Processor: retry success |
|
Retries that failed again |
Processor: retry failure |
|
Retries republished to main topic |
Processor: before republish |
messages_retried_total, retry_* and messages_sent_to_error_topic_total are defined but not currently incremented in the REST API or Folder implementations — only in Kafka/Pub/Sub processor applications if retry logic is active.
|
Per-Entity Counters — type: counter
| Prometheus metric | Labels | Description | Incremented by |
|---|---|---|---|
|
|
Messages received per entity |
REST API / Folder: on message received |
|
|
Messages processed per entity and result |
REST API / Folder |
|
|
Errors grouped by exception class name |
Processor: on DLQ send |
Folder-specific Gauges — type: gauge — label: entity (folder application only)
| Prometheus metric | Description |
|---|---|
|
Number of files pending processing in input folder |
|
Number of files in processed folder |
|
Number of files in failed folder |
Processing Time — type: histogram
| Prometheus metric | Description |
|---|---|
|
Number of observations |
|
Total accumulated time (seconds) |
|
Max time recorded in current interval |
|
p50 (median) |
|
p95 |
Average processing time per entity (PromQL):
rate(entity_processing_time_seconds_sum[5m]) / rate(entity_processing_time_seconds_count[5m])