Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

Should other teams consume raw table-level CDC streams from your service's database? Discuss the architecture trade-offs.

Generally not for service-to-service integration. Raw table-level CDC is quick to set up and complete, which makes it a good fit for analytics and replication into a warehouse, but it couples consumers to our internal schema so every refactor becomes a breaking change, and it exposes every column, including personal data. For operational consumers I would publish versioned domain events through an outbox, and offer raw CDC only to the data platform, under an explicit contract and with access control.

Why this question is asked

Once Debezium is running on a service's database, other teams quickly notice that every change is already flowing into Kafka, and they start subscribing. It feels efficient: no new API, complete data, real time. A year later, the owning team cannot rename a column without breaking three other services. Interviewers ask this to see whether an architect can weigh short-term speed against long-term coupling and data governance. In this answer, we will look at what raw CDC gives consumers, what it costs, how published domain events differ, a hybrid that uses each where it fits, and the access controls raw streams need.

1What Raw CDC Gives a Consumer

Raw CDC streams one event per row change for each captured table, with the row before and after and metadata from the log. Its strengths are real. It is fast to set up: the service team writes no code, only a connector configuration. It is complete: every insert, update and delete is captured, including changes made by scripts and manual fixes that would never have produced an application event. And it is faithful to the database, so a consumer can rebuild an exact copy of the tables.

Those are exactly the properties analytics and replication need. Loading tables into a warehouse, feeding a search index that mirrors a table, or migrating data to a new database all want a complete, faithful copy, and they are often run by teams who expect to reshape the data anyway.

2What It Costs: Coupling to the Internal Schema

The price is coupling. A service's tables are an implementation detail: they are normalised for its own queries, named by its developers and changed whenever its design changes. When another service consumes the raw stream, all of that becomes a public interface. Suppose the orders team splits the address columns into a separate table, or changes status from text to a numeric code. For the team, it is an internal refactor; for every raw CDC consumer, it is a breaking change, deployed without warning.

SQL
-- before: one table
-- orders(id, customer_id, status, ship_street, ship_city, total)
-- after a refactor
ALTER TABLE orders DROP COLUMN ship_street, DROP COLUMN ship_city;
CREATE TABLE order_address (order_id bigint, street text, city text);
-- every consumer of the orders CDC topic loses the address fields
-- and must now join two streams to rebuild what it had

Consumers also have to interpret internal meaning: what status 4 means, which rows are soft-deleted, which three tables together make up one order. That logic gets copied into each consumer, often incorrectly. Over time the owning team either stops refactoring, which slows the service down, or breaks its consumers regularly.

3Published Domain Events as the Alternative

A domain event describes something that happened in business terms, such as OrderPlaced or OrderShipped, with a schema designed for consumers rather than for storage. The service writes it through a transactional outbox, so it is as reliable as CDC, and Debezium can still carry it to Kafka. The difference is that the event's shape is a deliberate, versioned contract. The team can refactor its tables freely, as long as it keeps producing the same event, and when the event must change, it publishes version 2 alongside version 1 for a migration period.

JSON
{
"eventId": "1f0c6a4e-2b7d-4c55-9f0e-6d1a2b3c4d5e",
"type": "OrderPlaced",
"version": 2,
"orderId": "501",
"customerId": "88231",
"total": {"amount": "59.98", "currency": "EUR"},
"shippingAddress": {"street": "Main St 1", "city": "Berlin"}
} // same shape, however the tables are organised inside
Raw table CDC compared with domain events
ConcernRaw table CDCDomain events via outbox
Setup effortconnector configuration onlycode to design and write events
Completenessevery row change, including scriptsonly what the service chooses to publish
Couplingconsumers depend on internal tablesconsumers depend on a versioned contract
Meaningconsumers decode internal codesbusiness terms chosen for consumers
Personal dataevery column unless filteredonly fields in the contract
Best forwarehouse, replication, migrationservice-to-service integration

4A Hybrid: Each Stream for Its Consumer

In practice the answer is not one or the other. A common design gives two kinds of consumers two kinds of streams. Operational consumers, other services that react to what happens, such as shipping reacting to OrderPlaced, subscribe only to domain events. The data platform receives raw CDC for analytics, because the warehouse needs completeness and history, and its engineers are equipped to model raw tables.

Even the data platform's raw feed should be under a light contract: a list of captured tables, a schema registry with compatibility checks in the service's CI, and an agreement that breaking changes are announced with a migration period. That keeps the warehouse stable without freezing the service. If another service insists on raw CDC, for example to keep a local read model of a large table, we treat that as an exception that is documented, with the same contract, rather than a free-for-all.

Step throughChoosing a stream for a new consumer
  1. Who is the consumer?
  2. Is it the data platform or a replica?
    YesRaw CDC under a contractNoNext question
  3. Does it react to business events?
    YesDomain events via outboxNoDiscuss: maybe an API instead
  4. Grant access per topiccolumn filtering for personal data

4 steps in order. Play them, or step through them one at a time.

5Governing Access to Raw Streams

Raw CDC has a security side that is easy to overlook. It captures every column, so a stream of the customers table carries names, emails, addresses and perhaps tokens or internal notes, to anyone who can read the topic. Kafka topics are often far less protected than the database they came from.

So raw streams need governance. We capture only the tables needed, use Debezium's column filtering (column.exclude.list) or masking to drop or hash sensitive columns before they reach Kafka, and restrict topic access with Kafka ACLs to named consumers. Raw topics should be classified like the source data, with the same retention and deletion rules, so a deletion request for personal data is honoured in the stream and its copies too.

YAML
"table.include.list": "public.orders,public.order_line",
"column.exclude.list": "public.customers.email,public.customers.phone",
"column.mask.hash.SHA-256.with.salt.ab12cd": "public.customers.tax_id"

6Follow-up questions

Is it ever fine for another service to consume raw CDC?

Yes, when the alternative is worse and the coupling is accepted openly, for example a search service that must mirror a large product table with every column. Then the captured tables are documented as a contract, schema changes go through compatibility checks, and both teams agree how breaking changes are coordinated.

Can we make raw CDC look like events without an outbox?

Stream processing, for example a Kafka Streams or Flink job owned by the service team, can transform raw CDC into business events. That decouples consumers, but the job itself is still coupled to the tables and must change with them. An outbox keeps that logic in the service's own code and transaction.

How does the outbox affect the data platform?

The platform can consume both. Domain events are useful facts for analytics, and raw CDC fills in state such as current order status. Many warehouses model business process facts from events and dimensions from raw CDC.

7Conclusion

In this answer, we weighed raw table-level CDC against published domain events. Raw CDC is fast to set up and complete, which makes it a good fit for the warehouse and replication, but it couples consumers to internal tables, spreads internal meaning into every consumer and exposes all columns. Domain events written through an outbox give operational consumers a versioned contract that survives refactoring. A hybrid uses events between services and raw CDC under a contract for the data platform, with column filtering and access control on every raw stream.

What to say in the interviewAbout 80 seconds aloud

Open with

For other services, generally no. Raw table CDC is attractive because it's fast to set up, just a connector, and it's complete, including changes from scripts and manual fixes.

Then, if they want more

That's why it's great for analytics and for replicating into a warehouse or search index. But it makes our internal tables a public API. If we split a table or change a status code, that's an internal refactor for us and a breaking change for every consumer, deployed without warning.

Consumers also have to decode internal meaning, like what status 4 is or which rows are soft-deleted, and each one does it slightly differently. So for service-to-service integration I'd publish domain events, like OrderPlaced, through a transactional outbox. They're as reliable as CDC, but the shape is a versioned contract designed for consumers, and we can refactor tables freely.

My usual setup is a hybrid: events for operational consumers, raw CDC for the data platform under a light contract, meaning a list of captured tables, schema registry compatibility checks in our CI, and announced breaking changes.

And I'd govern the raw streams carefully, because they carry every column, including personal data: capture only the needed tables, exclude or hash sensitive columns in Debezium, and restrict topics with ACLs.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Should other teams consume raw table-level CDC streams from your service's database?...": https://scrivio-interview-library.netlify.app/databases/analytics-and-cdc/f98b9cba7f/