⏱ 19 min read
Most enterprise event platforms are not failing because Kafka is hard. They are failing because architects keep drawing pretty boxes, calling them “domain events,” and pretending the hard part is done.
It isn’t.
The gap between a UML model and a usable Kafka event design is where a lot of architecture work goes to die. Teams create class diagrams, process diagrams, capability maps, and immaculate domain models. Then six months later they have a Kafka cluster full of vague topics, brittle payloads, duplicated semantics, and IAM policies nobody understands. The model looked clean. The platform turned into archaeology.
Here’s the blunt opinion: UML is still useful, but only if you stop treating it like a software design artifact and start using it as a semantic pressure test for event contracts, ownership, and operational boundaries. If your UML never helps you decide topic boundaries, event keys, retention, access control, and schema evolution, then it’s just enterprise wallpaper. UML modeling best practices
That’s the problem. Now the simple version.
The simple explanation
UML helps you understand the business and system structure. Kafka helps systems communicate through events. The architecture job is translating one into the other without losing meaning.
In practice, that means:
- UML class and domain models help identify business entities and relationships
- UML sequence and activity diagrams help identify state changes and event timing
- UML bounded contexts or subsystem views help define who owns which events
- Kafka design turns that into:
- topics
- event schemas
- keys and partition strategy
- producer/consumer ownership
- security and IAM controls
- retention and replay rules
That translation is not mechanical. It is where architecture judgment matters.
And this is where many architects get lazy. They assume every class becomes an event, every workflow step becomes a topic, and every integration becomes “event-driven.” That is how you get noise, not architecture.
UML is not the target. Operating reality is the target.
A lot of architecture teams still approach UML like it’s the final expression of design truth. It isn’t. UML is a thinking tool. Kafka event design is an operating model. Those are different things. UML for microservices
A UML model can show that a Customer is related to Account, Card, Loan, and Consent. Fine. But Kafka does not care about your elegance. Kafka cares about:
- what changed
- who owns the truth
- who is allowed to publish
- who may consume
- how consumers recover
- what happens when schemas evolve
- what key preserves ordering
- what data must not leak across trust boundaries
That’s why the translation from UML to event design is not “model-driven architecture.” It’s architectural reduction. You are deciding what must become an event, what should remain internal state, and what absolutely should not be published at all.
That last part matters more than architects admit. In enterprise environments, especially banking and IAM-heavy platforms, the biggest design skill is often restraint. EA governance checklist
Start with business state changes, not object models
If you take one thing from this article, take this: events should represent meaningful state changes, not object snapshots by default.
Architects who come from application design often over-index on class diagrams. They see Payment, Account, User, Role, Session, Policy, and think the event architecture should mirror the object model. That is almost always a mistake.
An object model describes structure. An event model describes significance over time.
Those are not the same thing.
For example, in a banking domain, a UML class diagram might include:
- Customer
- Account
- Transaction
- Card
- Beneficiary
- FraudCase
- Consent
A weak architecture response is to create topics like:
customeraccounttransactioncardbeneficiaryfraudcaseconsent
And then publish CRUD-style events into each.
That looks tidy. It is also shallow. It tells you nothing about business semantics.
A stronger design starts with state transitions that matter to the enterprise:
- account opened
- payment initiated
- payment settled
- card blocked
- beneficiary verified
- consent revoked
- fraud case escalated
- customer identity revalidated
Now you have event candidates with meaning. Consumers can respond to them without reverse-engineering intent from a generic “updated” record.
This is where sequence diagrams and activity diagrams are more valuable than class diagrams. They reveal when something important happens, who triggers it, and what downstream consequences exist.
Honestly, many architecture teams underuse sequence models because they are less glamorous than capability maps. But sequence is where event truth lives.
The real mapping: from UML views to Kafka design decisions
Here’s a practical way to think about the translation.
This table is more useful than half the architecture repositories I’ve seen.
The point is simple: each UML view answers a different question. If you only use one view—usually the class model—you’ll design weak events.
Topic design is not domain modeling. It is contract design.
A topic is not just a technical channel. It is a statement of ownership and semantic stability.
That sounds obvious. But go into any large enterprise Kafka estate and you’ll find topics that exist because a team needed “somewhere to put messages.” No stewardship. No naming discipline. No retention logic. No access model. Just a pipe.
That is not architecture. That is deferred regret.
When moving from UML to Kafka, ask these questions for every event candidate:
- Who owns the business fact?
- Is this fact stable enough to publish externally?
- Does this event describe something completed, initiated, failed, or merely observed?
- Will downstream systems act on it, or just store it?
- What key preserves the ordering that matters?
- What data is safe to expose?
- How will the schema evolve over two years, not two sprints?
If your UML model cannot support those decisions, refine the model. Don’t skip the thinking.
A lot of event design failures are really ownership failures. The UML showed relationships but not accountability. Kafka punishes that ambiguity immediately.
A contrarian view: not everything should be an event
This needs saying because event-driven architecture has become a bit of a religion.
Not every state change deserves publication. Not every service should emit domain events. Not every team is mature enough to own a public event contract.
Sometimes the right answer is:
- keep it internal
- expose an API instead
- emit a coarse-grained integration event later
- use CDC carefully, or not at all
- avoid Kafka entirely for a narrow synchronous use case
There. I said it.
Architects often feel pressure to make everything “asynchronous” because it sounds modern and cloud-native. But event design creates long-lived obligations. The moment you publish an event, you create external dependency risk. Consumers will build around it. They will infer meaning you never intended. They will complain when fields change. They will ask for replay. Security teams will ask who can read PII. Audit teams will ask why retention is seven days when regulation expects seven years somewhere else.
So be selective. UML is useful here because it helps identify which business transitions are enterprise-significant versus merely application-local.
A password reset token generated in IAM? Probably internal.
A user authentication risk score elevated above threshold? Potentially enterprise-significant.
A role assignment changed for privileged banking operations? Absolutely an event, and a tightly controlled one.
Real architecture work: how this actually plays out
In real enterprise architecture, the journey from UML to Kafka usually happens across several workshops and a lot of disagreement.
A realistic sequence looks like this:
1. Model the domain and workflows
You start with business and application teams. You map entities, interactions, and state changes. This is where UML helps create shared language.
In banking, for example, for retail payments you might model:
- customer initiates payment
- payment enters validation
- sanctions screening runs
- fraud scoring runs
- payment approved or rejected
- payment submitted to clearing
- settlement confirmed
- customer notified
Already this tells you more than a static class diagram ever could.
2. Identify business facts worth publishing
Now you filter aggressively. Which transitions matter outside the originating service?
Good event candidates:
payment.initiatedpayment.screening.failedpayment.approvedpayment.settled
Bad event candidates:
payment.validationservice.calledpayment.rulesengine.response.receivedpayment.dto.updated
One set supports enterprise integration. The other set leaks implementation detail.
3. Assign ownership
This is where architecture gets political. Someone must own the event definition, schema lifecycle, topic naming, and quality standards.
If a payment orchestration service emits payment.approved, but the actual approval authority is a separate risk engine, you have a semantic problem. The producer is not the owner of truth.
That issue shows up in UML component and sequence views if you bother to look.
4. Define Kafka mechanics
Only now should you design:
- topic names
- partitions
- keys
- retention
- compaction
- schema strategy
- dead-letter handling
- replay model
Too many teams jump here first because Kafka settings feel concrete. But technical configuration without semantic clarity just scales confusion.
5. Apply IAM and cloud constraints
This is where enterprise architecture stops being theoretical.
In cloud environments, especially across AWS, Azure, or hybrid estates, event design must account for:
- workload identity
- topic-level authorization
- encryption requirements
- cross-account or cross-subscription access
- private networking
- data residency
- observability
- platform tenancy
A UML deployment diagram can help here, but most teams don’t keep it current. Then they act surprised when a topic meant for one region becomes consumed globally, or when IAM policies allow a whole integration namespace to read sensitive events.
That’s not a Kafka problem. It’s architecture negligence.
A real enterprise example: banking payments and IAM-driven event controls
Let’s make this concrete.
A global bank is modernizing its payment processing platform. Legacy payment systems are being decomposed into services running in a cloud-based Kubernetes environment. Kafka is the event backbone. The bank also has a centralized IAM platform that manages service identities, role-based access, and policy enforcement across environments.
The initial UML domain model for payments includes:
- Customer
- Account
- PaymentInstruction
- Beneficiary
- ComplianceCheck
- FraudAssessment
- Settlement
- Notification
The process model shows:
- customer creates payment
- payment validated
- sanctions and AML screening
- fraud assessment
- approval decision
- settlement request
- settlement confirmation
- customer notification
A weak architecture team would create one topic per entity and let each microservice publish updates.
So they end up with:
customer.eventsaccount.eventspaymentinstruction.eventscompliancecheck.eventsfraudassessment.events
Consumers then stitch together the story. It’s a mess. Ordering is unclear. Ownership is fuzzy. Sensitive data leaks. IAM becomes broad because too many consumers “need access.”
A better architecture team does this instead.
Event model
They define enterprise-significant events:
payments.initiatedpayments.screenedpayments.rejectedpayments.approvedpayments.submitted-for-settlementpayments.settledpayments.failedpayments.cancelled
Ownership model
- Payment orchestration owns initiation and lifecycle coordination events
- Compliance service owns screening outcome facts
- Fraud service owns fraud decision facts
- Settlement service owns settlement completion facts
No service emits facts it does not own.
Schema model
Schemas are defined in Avro or Protobuf with:
- business identifiers
- event timestamp
- correlation ID
- causation ID
- source system
- minimal payload needed by downstream consumers
- no unnecessary PII
The bank deliberately avoids shipping full customer records in payment events. That’s a mature decision. Consumers needing customer details call a governed API or consume a separate customer data product with stronger controls.
IAM model
Here is where real enterprise architecture matters.
The bank uses cloud workload identities mapped to Kafka principals. Topic ACLs are not broad “team-level” grants. They are purpose-specific:
- Payment orchestration service account can write to
payments.initiated - Fraud service can consume
payments.initiatedand writepayments.rejectedor fraud decision events - Notification service can consume
payments.settledandpayments.failed - Analytics consumers get access only to masked or curated topics, not raw payment decision streams
- Operational support tooling gets read access to observability topics, not business payload topics
This is much easier to govern because event semantics were clear from the start. UML helped identify responsibility boundaries; Kafka and IAM enforce them operationally.
Cloud deployment model
The bank runs regional Kafka clusters due to data residency rules. Some events are replicated across regions for operational reporting, others are not. The architecture explicitly distinguishes:
- local operational events
- regional business events
- global aggregated analytics events
Again, this is where many architects are sloppy. They model “payment event flow” as if geography and regulation do not exist. In banking, they always exist.
Common mistakes architects make
Let’s be honest. The same mistakes happen over and over.
1. Treating UML classes as event types
A class diagram is not an event catalog. It gives nouns, not necessarily meaningful verbs or facts.
2. Publishing CRUD events with no business semantics
AccountUpdated tells me almost nothing. Updated how? Why? By whom? Is it safe to act on? Generic update events are often just laziness disguised as flexibility.
3. Ignoring ownership
If nobody clearly owns the event contract, the topic becomes public chaos. Shared ownership is usually no ownership.
4. Mixing internal workflow noise with enterprise events
A lot of “event-driven” platforms are just internal service chatter spilled into Kafka. Downstream teams should not need to understand your retry logic or validation micro-steps.
5. Designing payloads for today’s consumer
This is subtle. Architects often shape an event around one immediate use case. Then six months later another consumer needs a slightly different field set, and the schema starts bloating. Events should be based on stable business facts, not one team’s convenience.
6. Forgetting IAM until the end
This is one of the worst enterprise sins. Security and access models are not bolt-ons. Topic design and IAM design are coupled. If a topic contains multiple sensitivity levels, your IAM choices become ugly very quickly.
7. Overusing CDC as event architecture
CDC can be useful. It can also be a shortcut that publishes database mutations without business meaning. If your event model is just the database screaming every time a row changes, don’t call that domain architecture.
8. No lifecycle thinking
Architects love launch diagrams. They are less excited about version 4 of a schema, two decommissioned consumers, one acquisition integration, and a regulator asking for replay evidence. But that is the real job.
How to make the translation well
Here’s a practical approach I’d recommend.
Step 1: Find the aggregate or business boundary
From the UML domain model, identify business aggregates or bounded contexts. In banking, payment, account, customer identity, consent, and fraud are different concerns. Don’t flatten them.
Step 2: Map state transitions
Use state or sequence diagrams to identify transitions that matter. Focus on business outcomes, not technical operations.
Step 3: Define event candidates as facts
Write them as facts in past tense where possible:
- payment initiated
- account frozen
- role revoked
- identity verified
This sounds simple, but it forces clarity.
Step 4: Separate public events from internal events
Not every event belongs on the enterprise bus. Some belong only inside a service boundary. Explicitly classify them.
Step 5: Design topics around ownership and consumption patterns
A topic should have a clear owner and a coherent semantic purpose. Avoid giant mixed-purpose topics.
Step 6: Design schemas with discipline
Include:
- event ID
- event type
- occurred-at timestamp
- producer identity
- business key
- correlation metadata
- payload with minimal stable data
Avoid:
- leaking internal object graphs
- embedding unrelated reference data
- shipping mutable snapshots unless that is the explicit contract
Step 7: Attach IAM and cloud design early
For each topic ask:
- who can produce?
- who can consume?
- does the topic contain regulated data?
- which environment and region can host it?
- is cross-account access allowed?
- do we need masking or derived topics?
This is architecture, not admin work. ArchiMate in TOGAF ADM
IAM and identity events: a special case
IAM is one of the best examples of why event semantics matter.
A UML model for IAM might include:
- User
- Role
- Group
- Policy
- Session
- Credential
- AccessRequest
- Approval
Again, a weak design emits generic updates. A stronger design emits meaningful security facts:
identity.user-provisionedidentity.user-disabledidentity.role-assignedidentity.role-revokedidentity.privileged-access-approvedidentity.credential-rotatedidentity.authentication-risk-elevated
Why does this matter? Because downstream systems react differently depending on semantics. A SIEM platform, a compliance engine, and an operational support system all need different fidelity and controls.
And IAM events are especially sensitive. Some should be widely consumable in masked form. Others should be restricted to security platforms only. If you don’t decide this at event design time, your Kafka estate becomes a security liability.
This is also where cloud-native identity matters. In AWS MSK, Confluent Cloud, Azure Event Hubs with Kafka surface, or self-managed Kafka on Kubernetes, service identity and topic authorization have to align with event ownership. If your platform team is handing out wildcard consume permissions because topic design is muddled, the architecture has already failed.
A note on cloud reality
Cloud does not simplify event architecture. It just makes bad architecture scale faster.
Yes, managed Kafka reduces operational burden. Good. But it does not solve:
- poor event semantics
- weak ownership
- bad topic granularity
- schema sprawl
- IAM overreach
- cross-region confusion
- compliance exposure
In fact, cloud often adds complexity:
- multiple accounts/subscriptions/projects
- federated IAM
- private endpoint constraints
- region-specific controls
- platform tenancy models
- cost visibility by topic or traffic pattern
A UML deployment view can help reason about this, but only if it reflects actual runtime topology. Many enterprise diagrams are stale the day after they are approved. That’s another uncomfortable truth. Architecture repositories often preserve intent, not reality.
So validate models against platform telemetry and actual deployment patterns. Otherwise your event design is being built on fiction.
What good looks like
A good UML-to-Kafka architecture has a few visible qualities:
- event names reflect business truth, not technical implementation
- topics have clear ownership
- schemas are small, stable, and intentional
- IAM policies align with topic sensitivity and producer/consumer roles
- internal events and enterprise events are separated
- region and cloud boundaries are explicit
- replay and retention are designed, not improvised
- consumers can understand the event without reading the producer code
That last test is underrated. If consumers need tribal knowledge from the producer team to interpret an event, the contract is weak.
Final thought
UML is not old-fashioned. Misusing UML is old-fashioned.
Kafka is not the architecture. It is the transport and log. The architecture is the set of semantic, operational, and governance decisions that turn business change into reliable, secure, consumable events. EA governance checklist
So yes, start with models. But don’t stop at diagrams. Force every model to answer uncomfortable operational questions: who owns this fact, who can read it, what does it mean, how does it evolve, and what happens in a real cloud estate under real IAM constraints?
That is the difference between architecture and drawing.
And enterprise teams feel that difference very quickly.
FAQ
1. Can UML really help with Kafka event design, or is it too abstract?
Yes, it helps a lot if used properly. Class diagrams alone are not enough, but sequence, activity, state, and component views are very useful for identifying meaningful state changes, ownership, and boundaries. UML should guide event semantics, not mechanically generate topics.
2. Should every microservice publish its own Kafka events?
No. That’s a popular idea, but not a good default. A service should publish events only when it owns a meaningful business fact that other systems need. Otherwise you create event noise, weak contracts, and governance problems.
3. What is the biggest mistake in enterprise Kafka topic design?
Usually it’s one of two things: generic CRUD events or unclear ownership. Both create downstream confusion. In regulated sectors like banking, a close third is ignoring IAM and data sensitivity until after topics already exist.
4. How do you handle sensitive data in banking or IAM events?
Minimize it at the source. Publish only what downstream consumers truly need. Use separate curated topics for broader consumption, keep raw sensitive events tightly restricted, and align Kafka ACLs or cloud IAM policies to topic purpose. Don’t rely on “we’ll secure it later.”
5. Is CDC a valid shortcut from data model to event model?
Sometimes, but carefully. CDC is useful for integration and legacy modernization, but database changes are not automatically good business events. If you use CDC, enrich or transform it into business semantics before calling it event architecture.
Frequently Asked Questions
How is Kafka modeled in enterprise architecture?
Kafka is modeled in ArchiMate as a Technology Service (the broker) or Application Component in the Application layer. Topics are modeled as Application Services or Data Objects. Producer and consumer applications connect to the Kafka component via Serving relationships, enabling dependency analysis and impact assessment.
What is event-driven architecture?
Event-driven architecture (EDA) is an integration pattern where components communicate by publishing and subscribing to events rather than calling each other directly. Producers emit events (e.g. OrderPlaced) to a broker like Kafka; consumers subscribe independently. This decoupling improves resilience, scalability, and the ability to add new consumers without changing producers.
How do you document event-driven architecture?
Document EDA using UML sequence diagrams for event flow scenarios, ArchiMate application cooperation diagrams for producer-consumer topology, and data object models for event schemas. In Sparx EA, Kafka topics can be modeled as named data objects with tagged values for retention, partitioning, schema version, and owning team.