Skip to content

Kafka Event Schema Catalog — Acme Financial Services

Kafka Event Schema Catalog — Acme Financial Services

Section titled “Kafka Event Schema Catalog — Acme Financial Services”

This document is the authoritative reference for all Kafka event schemas produced and consumed within Acme Financial Services (FSI). It covers event infrastructure conventions, the full event catalog, Avro schema definitions, and schema evolution rules.


All Kafka event schemas are managed via Confluent Schema Registry (v7.5), deployed alongside the Confluent Platform cluster on Azure Kubernetes Service.

SettingValue
Serialization FormatApache Avro
Compatibility ModeBACKWARD (per-subject)
Subject Naming StrategyTopicRecordNameStrategy — subject = {topic}-{fully.qualified.record.name}
Schema Registry URLhttps://schema-registry.fsi.acme.internal:8081
AuthenticationmTLS (service certificates issued by Acme FSI Private CA)
  • Topic naming: {domain}.{entity}.{action} — all lowercase, dot-separated.
    • Examples: banking.account.opened, payments.payment.authorized, risk.fraud-alert.raised
  • Key format: The message key is the primary business identifier for the entity, serialized as a plain string (UTF-8). This ensures co-partitioning for related events.
    • Examples: account_id for account events, transaction_id for transaction events, alert_id for fraud alerts.

Every event message includes the following Kafka headers (UTF-8 string values):

HeaderTypeDescription
event_idstring (UUID v4)Globally unique identifier for this event instance
event_typestringFully qualified event type (e.g., com.acme.fsi.banking.events.AccountOpened)
event_timestampstring (ISO 8601)Timestamp when the event was produced
source_servicestringProducing service identifier (e.g., core-banking-service)
correlation_idstring (UUID v4)Correlation ID for distributed tracing; propagated from the originating API request
schema_versionstringSchema version number (e.g., 3)

The following table lists all events in the FSI Kafka cluster.

EventTopicKeyProducerPrimary ConsumersRetention
AccountOpenedbanking.account.openedaccount_idCore Banking ServiceRisk Service, Wealth Service, Data Platform30 days
AccountClosedbanking.account.closedaccount_idCore Banking ServiceRisk Service, Wealth Service, Data Platform30 days
TransactionProcessedbanking.transaction.processedtransaction_idCore Banking ServicePayments Service, Risk Service, Data Platform14 days
TransferInitiatedbanking.transfer.initiatedtransaction_idCore Banking ServicePayments Service, Fraud Detection Service14 days
TransferCompletedbanking.transfer.completedtransaction_idPayments ServiceCore Banking Service, Data Platform14 days
PaymentAuthorizedpayments.payment.authorizedtransaction_idPayments ServiceCore Banking Service, Risk Service, Data Platform14 days
PaymentSettledpayments.payment.settledtransaction_idPayments ServiceCore Banking Service, Data Platform14 days
FraudAlertRaisedrisk.fraud-alert.raisedalert_idFraud Detection ServiceCore Banking Service, Compliance Service, Data Platform90 days
CreditScoreUpdatedrisk.credit-score.updatedaccount_idRisk Engine ServiceCore Banking Service (underwriting), Wealth Service30 days
RegulatoryReportGeneratedcompliance.regulatory-report.generatedreport_idCompliance ServiceData Platform, Audit Service90 days

Partition counts are sized per topic based on throughput requirements. High-volume topics (banking.transaction.processed, payments.payment.authorized) use 24 partitions; standard topics use 12 partitions.


{
"type": "record",
"name": "AccountOpened",
"namespace": "com.acme.fsi.banking.events",
"doc": "Emitted when a new customer account is opened in the Core Banking system.",
"fields": [
{"name": "event_id", "type": "string", "doc": "UUID v4 unique event identifier"},
{"name": "event_timestamp", "type": "string", "doc": "ISO 8601 timestamp of event creation"},
{"name": "account_id", "type": "string", "doc": "Unique account identifier (e.g., AC-10042387)"},
{"name": "customer_id", "type": "string", "doc": "Unique customer identifier"},
{"name": "account_type", "type": {"type": "enum", "name": "AccountType", "symbols": ["CHECKING", "SAVINGS", "MONEY_MARKET", "CD", "LOAN", "LINE_OF_CREDIT"]}, "doc": "Type of account opened"},
{"name": "product_code", "type": "string", "doc": "Internal product catalog code"},
{"name": "currency", "type": "string", "default": "USD", "doc": "ISO 4217 currency code"},
{"name": "branch_code", "type": ["null", "string"], "default": null, "doc": "Branch code where account was opened; null for digital-only"},
{"name": "opened_by", "type": "string", "doc": "User or system identifier that initiated account opening"}
]
}
{
"type": "record",
"name": "TransactionProcessed",
"namespace": "com.acme.fsi.banking.events",
"doc": "Emitted after a debit or credit transaction is posted to an account.",
"fields": [
{"name": "event_id", "type": "string", "doc": "UUID v4 unique event identifier"},
{"name": "event_timestamp", "type": "string", "doc": "ISO 8601 timestamp of event creation"},
{"name": "transaction_id", "type": "string", "doc": "Unique transaction identifier"},
{"name": "account_id", "type": "string", "doc": "Account to which the transaction was posted"},
{"name": "transaction_type", "type": {"type": "enum", "name": "TransactionType", "symbols": ["DEBIT", "CREDIT", "REVERSAL", "ADJUSTMENT"]}, "doc": "Type of transaction"},
{"name": "amount", "type": {"type": "bytes", "logicalType": "decimal", "precision": 18, "scale": 2}, "doc": "Transaction amount"},
{"name": "currency", "type": "string", "default": "USD", "doc": "ISO 4217 currency code"},
{"name": "running_balance", "type": {"type": "bytes", "logicalType": "decimal", "precision": 18, "scale": 2}, "doc": "Account balance after this transaction"},
{"name": "description", "type": ["null", "string"], "default": null, "doc": "Human-readable transaction description"},
{"name": "channel", "type": {"type": "enum", "name": "Channel", "symbols": ["BRANCH", "ATM", "ONLINE", "MOBILE", "ACH", "WIRE", "INTERNAL"]}, "doc": "Originating channel"},
{"name": "posting_date", "type": "string", "doc": "Business date (YYYY-MM-DD) the transaction was posted"}
]
}
{
"type": "record",
"name": "PaymentAuthorized",
"namespace": "com.acme.fsi.payments.events",
"doc": "Emitted when a payment transaction is authorized by the Payments Service.",
"fields": [
{"name": "event_id", "type": "string", "doc": "UUID v4 unique event identifier"},
{"name": "event_timestamp", "type": "string", "doc": "ISO 8601 timestamp of event creation"},
{"name": "transaction_id", "type": "string", "doc": "Unique payment transaction identifier"},
{"name": "account_id", "type": "string", "doc": "Payer account identifier"},
{"name": "amount", "type": {"type": "bytes", "logicalType": "decimal", "precision": 18, "scale": 2}, "doc": "Authorized payment amount"},
{"name": "currency", "type": "string", "default": "USD", "doc": "ISO 4217 currency code"},
{"name": "payment_type", "type": {"type": "enum", "name": "PaymentType", "symbols": ["ACH", "WIRE", "RTP", "CHECK", "CARD", "INTERNAL_TRANSFER"]}, "doc": "Payment rail or method"},
{"name": "merchant_category_code", "type": ["null", "string"], "default": null, "doc": "MCC code for card payments; null for non-card"},
{"name": "authorization_code", "type": "string", "doc": "Authorization reference code"},
{"name": "fraud_score", "type": "double", "doc": "Fraud probability score (0.0–1.0) from the real-time scoring engine"},
{"name": "screening_result", "type": {"type": "enum", "name": "ScreeningResult", "symbols": ["PASS", "REVIEW", "BLOCK"]}, "doc": "Result of sanctions and AML screening"}
]
}
{
"type": "record",
"name": "TransferCompleted",
"namespace": "com.acme.fsi.payments.events",
"doc": "Emitted when a fund transfer has been fully settled between accounts.",
"fields": [
{"name": "event_id", "type": "string", "doc": "UUID v4 unique event identifier"},
{"name": "event_timestamp", "type": "string", "doc": "ISO 8601 timestamp of event creation"},
{"name": "transaction_id", "type": "string", "doc": "Unique transfer transaction identifier"},
{"name": "source_account_id", "type": "string", "doc": "Originating account identifier"},
{"name": "destination_account_id", "type": "string", "doc": "Receiving account identifier"},
{"name": "amount", "type": {"type": "bytes", "logicalType": "decimal", "precision": 18, "scale": 2}, "doc": "Transfer amount"},
{"name": "currency", "type": "string", "default": "USD", "doc": "ISO 4217 currency code"},
{"name": "transfer_type", "type": {"type": "enum", "name": "TransferType", "symbols": ["INTERNAL", "ACH", "WIRE", "RTP"]}, "doc": "Transfer rail"},
{"name": "settlement_date", "type": "string", "doc": "Business date (YYYY-MM-DD) the transfer settled"},
{"name": "status", "type": {"type": "enum", "name": "TransferStatus", "symbols": ["COMPLETED", "RETURNED", "REVERSED"]}, "doc": "Final disposition of the transfer"}
]
}
{
"type": "record",
"name": "FraudAlertRaised",
"namespace": "com.acme.fsi.risk.events",
"doc": "Emitted when the Fraud Detection Service raises an alert on suspicious activity.",
"fields": [
{"name": "event_id", "type": "string", "doc": "UUID v4 unique event identifier"},
{"name": "event_timestamp", "type": "string", "doc": "ISO 8601 timestamp of event creation"},
{"name": "alert_id", "type": "string", "doc": "Unique fraud alert identifier"},
{"name": "account_id", "type": "string", "doc": "Account under investigation"},
{"name": "transaction_id", "type": ["null", "string"], "default": null, "doc": "Related transaction ID, if alert was triggered by a specific transaction"},
{"name": "risk_score", "type": "double", "doc": "Composite risk score (0.0–1.0)"},
{"name": "alert_type", "type": {"type": "enum", "name": "FraudAlertType", "symbols": ["TRANSACTION_ANOMALY", "VELOCITY_BREACH", "GEO_ANOMALY", "ACCOUNT_TAKEOVER", "FABRICATED_IDENTITY", "MULE_ACTIVITY"]}, "doc": "Category of fraud alert"},
{"name": "rules_triggered", "type": {"type": "array", "items": "string"}, "doc": "List of rule IDs that triggered this alert (e.g., ['RULE-VEL-001', 'RULE-GEO-042'])"},
{"name": "disposition", "type": {"type": "enum", "name": "AlertDisposition", "symbols": ["OPEN", "INVESTIGATING", "CONFIRMED_FRAUD", "FALSE_POSITIVE", "ESCALATED"]}, "doc": "Current disposition of the alert"}
]
}
{
"type": "record",
"name": "CreditScoreUpdated",
"namespace": "com.acme.fsi.risk.events",
"doc": "Emitted when an account's internal credit risk score is recalculated.",
"fields": [
{"name": "event_id", "type": "string", "doc": "UUID v4 unique event identifier"},
{"name": "event_timestamp", "type": "string", "doc": "ISO 8601 timestamp of event creation"},
{"name": "account_id", "type": "string", "doc": "Account whose credit score was updated"},
{"name": "customer_id", "type": "string", "doc": "Customer identifier"},
{"name": "previous_score", "type": ["null", "int"], "default": null, "doc": "Previous credit score; null if first calculation"},
{"name": "new_score", "type": "int", "doc": "Updated credit score (300–850 internal scale)"},
{"name": "score_change", "type": "int", "default": 0, "doc": "Delta between previous and new score"},
{"name": "model_version", "type": "string", "doc": "Version of the credit scoring model used (e.g., 'csm-v3.2.1')"},
{"name": "risk_grade", "type": {"type": "enum", "name": "RiskGrade", "symbols": ["AAA", "AA", "A", "BBB", "BB", "B", "CCC", "CC", "C", "D"]}, "doc": "Risk grade derived from the score"},
{"name": "contributing_factors", "type": {"type": "array", "items": "string"}, "doc": "Top factors influencing the score (e.g., ['PAYMENT_HISTORY', 'UTILIZATION_RATIO', 'DELINQUENCY'])"}
]
}

All schema changes must follow these rules to maintain backward compatibility and prevent consumer breakage.

Change TypeAllowed?Conditions
Add a new field✅ YesField must have a default value or be a union with null (i.e., ["null", "type"]).
Add a new enum symbol✅ YesNew symbols must be appended to the end of the symbols array. Consumers must handle unknown enum values gracefully (log and skip).
Add a new doc string✅ YesDocumentation-only change; no impact on serialization.
Widen a type (e.g., int → long)✅ YesOnly for Avro-supported type promotions (int → long, float → double).
Change TypeAllowed?Reason
Remove an existing field❌ NoBreaks consumers that depend on the field.
Rename an existing field❌ NoAvro resolves by field name; renaming is equivalent to remove + add.
Change a field’s type (non-promotion)❌ NoCauses deserialization errors in consumers.
Remove an enum symbol❌ NoConsumers holding data with the removed symbol cannot deserialize.
Reorder enum symbols❌ NoAvro encodes enums by ordinal position; reordering changes the wire format.
Change a field from optional to required❌ NoOlder messages without the field will fail deserialization.
  1. Author submits a schema change via pull request to the fsi-event-schemas repository.
  2. CI pipeline runs confluent schema-registry compatibility check against the Schema Registry’s stored schema. The PR is blocked if the compatibility check fails.
  3. Peer review: At least one member of the producing team and one member of the consuming team must approve the PR.
  4. Merge and deploy: On merge to main, the CI/CD pipeline registers the new schema version in Schema Registry. The new version becomes the latest for that subject.
  5. Consumer notification: A Slack notification is posted to #fsi-event-schemas with the schema diff and migration notes.

Schema versions in the Confluent Schema Registry are auto-incremented integers (v1, v2, v3, …). The schema_version Kafka header on each produced message reflects the registry version used at serialization time. Consumers using the Avro deserializer with Schema Registry automatically resolve to the correct reader schema via the embedded schema ID in the message payload (Confluent wire format: magic byte + 4-byte schema ID + Avro payload).


  • Use specific Avro reader schemas: Consumers should compile their reader schema from the fsi-event-schemas repository at build time. The Avro deserializer performs automatic schema resolution between the writer and reader schemas.
  • Handle unknown enum values: When an enum field contains a symbol not in the consumer’s reader schema, the consumer should log a warning and skip processing rather than fail.
  • Idempotency: Every event carries a unique event_id. Consumers must use event_id for idempotent processing (e.g., deduplication via a processed-event store or Kafka consumer offset management).
  • Ordering guarantees: Events for the same entity are partitioned by the entity’s key (e.g., account_id). Consumers can rely on per-partition ordering but must not assume global ordering across partitions.
  • Dead-letter topics: Consumers should route messages that fail deserialization or business validation to a dead-letter topic ({original_topic}.dlq) for manual review. Dead-letter topics have a 30-day retention.

For questions about event schemas or to request a new event type, contact the FSI Event Platform team via #fsi-event-platform on Slack or submit a request through the fsi-event-schemas repository.