Enterprise API and Event Catalog: Discovery, Lineage, Ownership, Lifecycle, and Runtime Telemetry
Learn Java API Contract Engineering, Event Contract Engineering & Schema Governance - Part 028
Enterprise API and event catalog design: discovery, ownership, lifecycle, schema links, consumer inventory, lineage, governance dashboards, runtime telemetry, and integration with Java platform engineering.
Part 028 — Enterprise API and Event Catalog: Discovery, Lineage, Ownership, Lifecycle, and Runtime Telemetry
Tujuan Pembelajaran
API/event catalog adalah sistem discovery dan governance untuk contract ecosystem.
Tanpa catalog, engineer bertanya di Slack:
Ada event untuk customer active nggak?
Siapa owner topic ini?
Schema yang dipakai versi mana?
Apakah event ini deprecated?
Consumer mana saja yang pakai endpoint ini?
Apakah payload ini mengandung PII?
Kalau ingin replay, retention-nya berapa?
Catalog yang matang menjawab pertanyaan tersebut secara self-service.
Namun catalog bukan sekadar portal dokumentasi. Catalog enterprise harus menghubungkan:
- OpenAPI specs;
- AsyncAPI specs;
- schemas;
- Kafka topics/channels;
- event types;
- owners;
- lifecycle;
- compatibility policy;
- data classification;
- consumer inventory;
- lineage;
- runtime telemetry;
- deprecation/migration;
- incidents and support;
- SDKs/stubs/examples.
Setelah part ini, kamu harus mampu:
- mendesain API/event catalog sebagai platform capability;
- menentukan data model catalog;
- menghubungkan catalog dengan schema registry, contract repo, CI, Kafka, gateway, runtime telemetry;
- membuat consumer inventory and lineage;
- menampilkan lifecycle, compatibility, and governance metadata;
- mendukung search/discovery;
- membuat dashboard governance;
- menghindari catalog yang menjadi wiki mati.
1. Catalog Is Not Just Documentation
Documentation answers:
What is this API/event?
Catalog answers:
What exists, who owns it, how stable is it, who uses it, how does it evolve, how do I integrate, and what risk exists?
A catalog should be generated/synced from authoritative sources, not manually maintained page-by-page.
2. Catalog User Personas
2.1 Consumer Engineer
Needs:
- find API/event;
- understand meaning;
- see examples;
- know stability/lifecycle;
- know auth/access process;
- get SDK/stubs;
- understand errors/retry/replay;
- register consumption.
2.2 Provider Engineer
Needs:
- publish contract;
- see consumers;
- manage deprecation;
- track compatibility;
- monitor usage;
- respond to incidents.
2.3 Platform Engineer
Needs:
- enforce governance;
- detect drift;
- maintain registry integration;
- measure coverage;
- route reviews;
- manage lifecycle.
2.4 Architect/Tech Lead
Needs:
- understand system dependencies;
- assess blast radius;
- review change risk;
- identify duplicated contracts;
- track domain ownership.
2.5 Security/Data Governance
Needs:
- find sensitive data flows;
- enforce classification;
- approve consumers;
- audit access;
- ensure retention and jurisdiction.
3. Catalog Core Entities
Core entities:
- service/system;
- API;
- API operation;
- event type;
- channel/topic/queue;
- schema artifact;
- schema version;
- owner/team;
- consumer;
- consumption/subscription;
- lifecycle record;
- compatibility policy;
- example;
- SDK/stub;
- deprecation/migration record;
- runtime metric.
4. Catalog Entity: Service
service:
id: case-service
name: Case Service
ownerTeam: case-management-platform
domain: case-management
repository: github.com/acme/case-service
runtimeTier: tier-1
onCall: case-platform-oncall
provides:
apis:
- case-api
events:
- CaseSubmitted
- CaseApproved
consumes:
events:
- CustomerKycVerified
Service catalog links technical ownership to contracts.
5. Catalog Entity: API
api:
id: customer-api
title: Customer API
type: HTTP
ownerTeam: customer-platform
lifecycle: stable
visibility: internal
openApiRef: openapi/customer-api.yaml
baseUrls:
prod: https://api.acme.internal/customers
compatibilityPolicy: no-breaking-without-deprecation
dataClassification: confidential
authentication:
type: OAuth2
scopes:
- customer.read
- customer.write
API operation:
operation:
operationId: getCustomer
method: GET
path: /customers/{customerId}
summary: Get customer by ID.
lifecycle: stable
sdkMethods:
java: CustomerClient.getCustomer
consumers:
- case-management-service
- crm-sync
6. Catalog Entity: Event Type
eventType:
name: CaseApproved
qualifiedName: com.acme.case.events.CaseApproved
ownerTeam: case-management-platform
authority: case-service
lifecycle: stable
description: A case has been approved by an authorized actor.
channel: case-events
messageKey: metadata.aggregateId
ordering: per-case
delivery: at-least-once
replaySupported: true
schemaArtifact: com.acme.case.events.CaseApproved
asyncApiRef: asyncapi/case-events.yaml#/components/messages/CaseApproved
dataClassification: confidential
pii: false
compatibility: BACKWARD_TRANSITIVE
Consumer assumptions:
consumerAssumptions:
- Case state is APPROVED after this event.
- Duplicate delivery is possible.
- Consumers must deduplicate by metadata.eventId.
- Global ordering is not guaranteed.
This is much richer than schema.
7. Catalog Entity: Channel / Topic
channel:
name: case-events
protocol: kafka
ownerTeam: case-management-platform
purpose: Case lifecycle event stream.
messageTypes:
- CaseSubmitted
- CaseAssigned
- CaseApproved
- CaseClosed
key:
expression: metadata.aggregateId
meaning: caseId
ordering:
scope: per-case
retention:
policy: delete
duration: P90D
cleanupPolicy: delete
dlq: case-events-dlq
dataClassification: confidential
access:
approvalRequired: true
Topic catalog should include runtime config and contract config, with drift status.
8. Catalog Entity: Schema Artifact
schemaArtifact:
id: com.acme.case.events.CaseApproved
format: AVRO
registry: prod-schema-registry
group: case
compatibility: BACKWARD_TRANSITIVE
lifecycle: stable
ownerTeam: case-management-platform
currentVersion: 7
versions:
- version: 1
introducedAt: 2025-08-01
- version: 7
introducedAt: 2026-06-29
references:
- com.acme.common.EventMetadata
Schema version page should show:
- raw schema;
- rendered fields;
- compatibility result;
- examples;
- changelog;
- generated artifacts;
- dependent schemas;
- events/channels using it.
9. Catalog Entity: Consumer / Consumption
Consumer registration:
consumption:
consumerId: case-projection-service
ownerTeam: case-management-platform
consumes:
type: event
eventType: CaseApproved
channel: case-events
consumerGroup: case-projection-service
usage:
fields:
- payload.caseId
- payload.caseVersion
- payload.reasonCode
sideEffects:
- update-case-search-projection
criticality: tier-1
replayBehavior: projection-safe
lastSeenAt: 2026-06-29T05:30:00Z
schemaVersionsObserved:
- 6
- 7
This powers impact analysis.
10. Catalog Pages
10.1 API Page
Should include:
- summary and owner;
- lifecycle;
- base URL;
- auth scopes;
- operations;
- schemas;
- errors;
- examples;
- SDK/client;
- changelog;
- consumers;
- deprecation status;
- incidents/support;
- OpenAPI download.
10.2 Event Page
Should include:
- event meaning;
- authority;
- topic/channel;
- key/order/delivery/replay;
- schema;
- examples;
- consumer assumptions;
- producer guarantees;
- consumers;
- lifecycle;
- compatibility;
- deprecation/migration;
- DLQ/replay guidance;
- AsyncAPI download.
10.3 Topic Page
Should include:
- event types carried;
- key strategy;
- retention/compaction;
- partitions/replication if exposed;
- ACL/access;
- DLQ/retry topics;
- consumers/groups;
- lag/traffic;
- drift status.
10.4 Schema Page
Should include:
- schema content;
- version history;
- compatibility mode;
- references/dependents;
- examples;
- generated Java artifact;
- changelog;
- lifecycle.
11. Search and Discovery
Catalog search should support:
- keyword search;
- domain filter;
- owner filter;
- lifecycle filter;
- data classification filter;
- event type search;
- field search;
- schema search;
- topic/channel search;
- consumer search;
- deprecated filter;
- API method/path search.
Example queries:
customer activated event
case approved
events containing customerId
APIs owned by customer-platform
deprecated events with active consumers
topics with restricted data
schemas using Money
Field-level search is powerful but must respect data sensitivity.
12. Lineage
Lineage shows data flow.
Example:
Lineage should answer:
- who produces event?
- which topic carries it?
- who consumes it?
- what downstream APIs/events are triggered?
- what data classification flows?
- what blast radius if event changes?
- what dependency path exists for incident?
Lineage must be partially automated from runtime telemetry. Manual lineage rots.
13. Runtime Telemetry Integration
Catalog should show runtime evidence:
For APIs:
- request rate;
- error rate;
- latency;
- consumers/client IDs;
- auth scopes used;
- deprecated endpoint traffic;
- SDK version if reported.
For events:
- producer event rate;
- event types observed;
- schema versions observed;
- consumer groups;
- consumer lag;
- DLQ count;
- deprecated event consumption;
- unknown event type errors.
Example event telemetry:
runtime:
lastProducedAt: 2026-06-29T05:40:00Z
eventsPerHour: 12043
schemaVersionsObserved:
- 7
activeConsumerGroups:
- case-projection-service
- notification-service
- analytics-case-loader
dlqLast24h: 3
Runtime evidence prevents stale catalog.
14. Catalog and Consumer Inventory
Consumer inventory can be:
- manual registration;
- API key/client ID telemetry;
- Kafka consumer group telemetry;
- service mesh traces;
- SDK telemetry;
- gateway logs;
- repository dependency scanning;
- schema registry access logs.
Best system combines explicit registration + runtime detection.
14.1 Registered vs Observed Consumers
registeredConsumers:
- case-projection-service
- notification-service
observedConsumers:
- case-projection-service
- notification-service
- unknown-consumer-group-892
Unknown consumers are governance risk.
15. Catalog and Access Control
Catalog must enforce visibility.
Not every user should see every schema/event if names/fields reveal sensitive information.
Access model:
| Data | Visibility |
|---|---|
| public API | broad |
| internal API | employee/internal |
| confidential schema | approved teams |
| restricted schema | need-to-know |
| security-sensitive fields | masked or hidden |
| deprecated migration notes | known consumers + owners |
Catalog search should respect ACL.
16. Data Classification View
Security/data governance needs queries:
- show all events with PII;
- show all topics with restricted data;
- show consumers of national ID;
- show schemas with retention class X;
- show data crossing jurisdiction;
- show DLQs containing restricted payloads.
Example dashboard:
Restricted Data Flows
- customer-events: contains PII, 7 consumers
- identity-verification-events: restricted, 3 consumers
- fraud-signals: confidential, 5 consumers
This is difficult without catalog metadata.
17. Lifecycle Dashboard
Catalog should show lifecycle health.
Metrics:
Artifacts
- Stable: 940
- Experimental: 87
- Experimental expiring in 30d: 12
- Deprecated: 61
- Deprecated with active consumers: 43
- Retired but still produced: 2
- Missing owner: 0
- Missing examples: 29
This turns lifecycle from theory into operational hygiene.
18. Compatibility Dashboard
Show:
- artifacts by compatibility mode;
- NONE compatibility exceptions;
- expiring exceptions;
- failed compatibility checks;
- dangerous changes awaiting approval;
- breaking changes by domain;
- replay test coverage;
- generated code failure trends.
Example:
Compatibility Risk
- Stable schemas with NONE compatibility: 3
- Backward transitive: 712
- Full transitive: 84
- Dangerous changes this week: 9
- High-risk pending reviews: 2
19. Deprecation Dashboard
Show:
- deprecated artifacts;
- replacement;
- sunset date;
- active consumers;
- traffic trend;
- migration status;
- blockers.
Example:
CustomerActivated
Status: Deprecated
Replacement: CustomerLifecycleActivated
Sunset target: 2027-03-31
Active consumers: 4
Traffic last 7d: 1.2M
Migration status: 50%
This prevents “deprecated forever.”
20. Catalog Data Sources
| Source | Data |
|---|---|
| contract repo | source contracts, lifecycle, decisions |
| schema registry | schema versions, compatibility, IDs |
| API gateway | traffic, clients, auth scopes |
| Kafka broker | topics, groups, lag, configs |
| observability platform | traces, metrics, logs |
| CI/CD | releases, build metadata |
| service catalog | owner, repo, tier, on-call |
| IAM/security | access approvals |
| developer portal | docs/pages |
| incident system | contract-related incidents |
Integrations should be automated.
21. Catalog Freshness
Catalog page should show freshness:
lastSyncedAt: 2026-06-29T05:45:00Z
sources:
contractRepo: synced
schemaRegistry: synced
kafkaRuntime: stale_2h
gatewayTelemetry: synced
If runtime telemetry stale, users should know.
22. Catalog Sync Pipeline
Use incremental sync where possible.
23. Catalog Data Quality Rules
Rules:
- every stable artifact has owner;
- every stable event has topic/channel;
- every event has schemaRef;
- every schemaRef resolves;
- every deprecated artifact has replacement or reason;
- every topic has data classification;
- every stable API has OpenAPI;
- every stable event has AsyncAPI or equivalent;
- every schema has lifecycle;
- every restricted artifact has access policy.
Violations should create issues/alerts.
24. Catalog and Contract Review
During PR, catalog context helps reviewers:
- known consumers;
- criticality;
- lifecycle;
- data classification;
- traffic;
- schema version usage;
- deprecation status;
- prior incidents.
Review bot comment:
Catalog context:
- Event `CaseApproved` has 12 consumers, 3 tier-1.
- Active schema versions observed: 6, 7.
- Replay supported for 90 days.
- Data classification: confidential.
- Last incident: DLQ spike on 2026-05-14.
This makes review evidence-based.
25. Catalog and Incident Response
During incident, catalog answers:
- who owns event/API?
- who consumes it?
- what changed recently?
- which schema version introduced issue?
- which consumers are affected?
- what DLQ/replay path exists?
- what rollback/migration guide exists?
- who is on-call?
Incident page should link to catalog entity.
26. Catalog and SDK/Artifacts
Catalog should link:
- Java SDK artifact;
- Maven coordinates;
- latest version;
- compatibility notes;
- generated client docs;
- sample code;
- changelog.
Example:
sdk:
language: java
groupId: com.acme.sdk
artifactId: customer-api-client
latestVersion: 3.8.0
minJavaVersion: 21
changelog: ...
This improves consumer onboarding.
27. Catalog and Examples
Catalog examples should be source-controlled and validated.
Event example page:
{
"metadata": {
"eventId": "evt_01J2...",
"eventType": "CaseApproved",
"source": "case-service"
},
"payload": {
"caseId": "case_01J2...",
"caseVersion": 17,
"reasonCode": "EVIDENCE_COMPLETE"
}
}
Examples should show:
- minimal valid;
- full valid;
- error/problem;
- old version if relevant;
- DLQ if relevant.
28. Catalog Implementation Architecture
Possible architecture:
Storage:
- relational DB for core entities;
- search index for discovery;
- graph model for lineage;
- object storage for rendered docs/artifacts;
- metrics store links for telemetry.
Do not start with overcomplex graph if data quality is low. Start with core entity model and grow.
29. Catalog APIs
Catalog itself should expose APIs:
- search artifacts;
- get API detail;
- get event detail;
- get schema versions;
- register consumer;
- query consumers;
- query lineage;
- update lifecycle;
- list deprecated artifacts;
- get risk context for PR.
Example:
GET /catalog/events/CaseApproved
GET /catalog/topics/case-events/consumers
POST /catalog/consumptions
GET /catalog/artifacts/{id}/impact
Treat catalog API as internal platform contract.
30. Catalog Anti-Patterns
30.1 Wiki Catalog
Manual pages rot.
30.2 Schema-Only Catalog
Shape visible, meaning/ownership absent.
30.3 No Runtime Telemetry
Catalog claims no consumers, but production has unknown consumers.
30.4 No Lifecycle
Consumers adopt deprecated/experimental artifacts.
30.5 No Access Control
Sensitive schemas discoverable by everyone.
30.6 No Search
Portal exists but nobody can find anything.
30.7 No Ownership
Catalog says what, not who.
30.8 No Integration with Review
PR reviewers lack impact data.
30.9 No Deprecation Dashboard
Deprecated forever.
30.10 Catalog as Separate Truth
Catalog data diverges from registry/contracts/runtime.
31. Maturity Model
| Level | Behavior |
|---|---|
| 0 | contracts scattered in repos/wiki |
| 1 | static docs generated from OpenAPI/AsyncAPI |
| 2 | schema registry linked to docs |
| 3 | ownership/lifecycle/search available |
| 4 | consumer inventory and lineage |
| 5 | runtime telemetry and governance dashboards |
| 6 | PR impact analysis, drift detection, automated onboarding |
| 7 | telemetry-driven deprecation and risk analytics |
Aim for Level 4 for internal platform. Level 5+ for enterprise-critical ecosystem.
32. Practice Lab
Lab 1 — Catalog Entity Model
Design catalog model for:
- service;
- API;
- event type;
- topic;
- schema artifact;
- consumer;
- lifecycle;
- ownership.
Lab 2 — Event Page
Design catalog page for CaseApproved.
Include all fields a new consumer needs.
Lab 3 — Consumer Inventory
Design registration form for a service consuming CustomerActivated.
Include usage fields, side effects, criticality, owner, consumer group, and replay behavior.
Lab 4 — Dashboard
Design dashboard for deprecated events with active consumers.
Lab 5 — Lineage
Draw lineage from CustomerKycVerified to CaseApproved to NotificationSent.
Lab 6 — Drift Detection
Catalog says topic case-events retention is 90 days, Kafka runtime says 30 days. Design alert and remediation.
33. Senior Engineer Heuristics
- Catalog is governance infrastructure, not only docs.
- Catalog must be generated from authoritative sources.
- Every contract needs owner, lifecycle, and examples.
- Schema shape without meaning is insufficient.
- Runtime telemetry keeps catalog honest.
- Consumer inventory powers impact analysis.
- Lineage turns contract changes into blast-radius understanding.
- Deprecated artifacts need dashboards.
- Access control matters because schemas reveal data.
- Search quality determines adoption.
- Catalog should feed PR review context.
- Registry and catalog are complementary, not identical.
- Unknown consumers are governance risk.
- A catalog with stale data is worse than no catalog.
- A good catalog lets a new engineer integrate safely without tribal knowledge.
34. Summary
Enterprise API and event catalog centralizes discovery, ownership, lifecycle, schemas, channels, consumers, lineage, runtime telemetry, and governance dashboards. It connects contract repository, schema registry, gateway, Kafka metadata, CI/CD, service catalog, and observability.
Main takeaways:
- catalog is not just documentation;
- catalog data model should include services, APIs, events, topics, schemas, consumers, lifecycle, and ownership;
- event pages must include semantic, operational, schema, and governance details;
- runtime telemetry prevents stale catalog;
- consumer inventory enables impact analysis;
- lineage supports architecture review and incidents;
- lifecycle/deprecation dashboards turn governance into operational hygiene;
- access control matters for sensitive schemas;
- catalog should sync from authoritative sources;
- catalog context should appear directly in contract PR reviews.
Part berikutnya membahas multi-team contract operating model: ownership, producer/consumer responsibilities, platform governance, review councils, paved roads, escalation, and operating rhythms.
You just completed lesson 28 in final stretch. Use the series map if you want to review the broader track, or continue directly into the next lesson while the context is still warm.
Keep the momentum while the lesson is still fresh. Move backward for review or continue forward into the next concept.