Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

Teams want to use in-process Spring events as the first step towards splitting a monolith into services. How would you judge this strategy over several years?

It is a reasonable first step if we judge it by the right goal: events make module boundaries visible and cut direct calls, which is valuable on its own. They help only when event contracts are explicit and modules do not share data, and moving to a broker later still needs real work on durability, ordering and idempotency. Tools such as Spring Modulith can verify the boundaries before any split, and many systems should stay a well-structured monolith, because splitting is not required to get most of the value.

Why this question is asked

When a monolith becomes painful, teams often reach for microservices as the cure, and in-process Spring events look like a cheap way to start: replace calls between modules with events now, swap the transport for a broker later. Interviewers ask a senior engineer to judge this over several years because the strategy can either build a genuinely modular system or produce a distributed monolith with extra steps. In this answer, we will look at what events actually buy inside a monolith, the conditions under which they help, the work a later move to a broker still needs, how to verify boundaries before splitting, and how to decide whether to split at all.

1What Events Buy Inside a Monolith

Replacing a direct call with an event changes who knows about whom. When orders calls billing.createInvoice(), the orders module depends on billing. When orders publishes OrderPlaced and billing listens, orders no longer knows billing exists. Each event makes one dependency explicit, as a named type with a clear owner, and removes one direct call.

That is a real improvement, and it pays off whether or not we ever split. Module boundaries become visible in the code, teams can change a module's internals without coordinating, and the list of events becomes a map of how the system's parts interact. So I would judge the strategy first by whether the monolith becomes better structured, not by how fast it turns into services.

2The Conditions Under Which It Helps

Events help only if two conditions hold. First, the event contracts must be explicit: small, stable records owned by the publishing module, carrying the facts a listener needs, such as an order id and a total, rather than a JPA entity that drags in lazy relations and the publisher's internals. Second, modules must not share data. If billing's listener reads the orders tables directly to get the details it needs, the event decoupled the code while the database keeps the modules welded together, and no split will be possible without untangling it.

I have seen the second condition fail more often than the first. Teams introduce events diligently and keep a single schema that every module queries. After two years, they have the complexity of events and the coupling of a shared database. So in reviews, I would ask of every listener: what data does it read, and who owns that data?

3The Work a Broker Still Needs

The idea that we can later swap the in-process transport for a broker is only partly true. In-process events have properties that a broker does not give for free. They are delivered in microseconds, synchronously if we want, in the order they were published, inside the publisher's transaction if the listener is synchronous. A broker gives none of this by default.

In-process events compared with broker events
PropertyIn-process eventBroker event
Durabilitynone: lost if the JVM stopsstored by the broker
Transactioncan share the publisher'snever; needs an outbox
Orderingpublication order on one threadper partition key only
Duplicatesneverpossible; consumers must be idempotent
Latencymicrosecondsmilliseconds to seconds
Every row where the columns differ is work the split will need.

4Preparing Before Any Split

So the preparation is to make the monolith behave as if the modules were already separate. Listeners that the business depends on should already run after commit and, ideally, through an event publication registry or outbox, so that losing them on a crash is handled now. Listeners should already be idempotent and should not depend on the order of events from different publishers. Then the move to a broker changes the transport, not the semantics.

Spring Modulith helps here. It can verify in a test that modules only use each other's public API and that there are no dependency cycles, document which modules publish and consume which events, and provide the publication registry. If the verification test passes for months and the module diagram shows a clean dependency graph, a split is a manageable project. If not, splitting would only distribute the tangle.

Step throughReadiness of a module for extraction
  1. Does Modulith verification pass?
    YesNext checkNoFix the boundary first
  2. Does it own its data alone?
    YesNext checkNoSeparate the tables first
  3. Are its listeners durable and idempotent?
    YesNext checkNoAdd registry or outbox, dedupe
  4. Is there a reason to split?
    YesExtract it as a serviceNoKeep it as a module

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

5Deciding Whether to Split at All

The last question is the most important. A split pays off when a module needs to scale very differently from the rest, needs a different release cadence owned by a separate team, or needs isolation for reliability or compliance. Without such a reason, a service boundary adds network failures, deployment coordination and eventual consistency, and gives little back.

Many systems I have seen got most of the value from the modularisation itself: teams own modules, change them independently, and test them alone, while deployment stays one artifact. So over several years I would measure success as clearer boundaries and fewer cross-team changes. Splitting is an option the work keeps open, not the goal it must reach.

6Follow-up questions

What is a distributed monolith, and how does this strategy risk one?

It is a system split into services that still cannot change or deploy independently, because they share a database, depend on each other's internals or need synchronous chains of calls. If in-process events are introduced without explicit contracts and without separating data, splitting them along those lines produces exactly that.

Should events replace all calls between modules?

No. Where the caller needs an answer now, such as checking a credit limit before accepting an order, a call through the other module's public interface is clearer and more honest. Events suit facts that other modules react to, where the publisher does not need the result.

How long would you give this before judging it?

I would look for early signals within a quarter, such as the verification test passing and cross-module changes decreasing, and judge the strategy over a year or two. Structural improvements show up in fewer coordinated releases and smaller blast radius of changes, which take time to measure.

7Conclusion

In this answer, we judged in-process events as a first step towards services. They make boundaries visible and reduce direct calls, which is valuable on its own, but only with explicit event contracts and without shared data. A later move to a broker still needs durability, ordering and idempotency work, best done before the split. Spring Modulith can verify boundaries and provide a publication registry, and many systems should stay a well-structured monolith because the modularisation delivers most of the value.

What to say in the interviewAbout 80 seconds aloud

Open with

I would judge it by whether the monolith becomes better structured, not by how quickly services appear. Replacing direct calls with events makes each dependency explicit and gives the publishing module ownership of a contract, which is valuable even if we never split.

Then, if they want more

But it only helps under two conditions: the events are small, explicit records owned by the publisher, not entities, and modules do not share data. If listeners still read other modules' tables, we have decoupled the code but not the system, and a split would create a distributed monolith.

I would also be honest that swapping the transport later is not free. In-process events are instant, ordered, never duplicated and can share a transaction; broker events are none of those. So before any split, I would make the important listeners durable with Spring Modulith's publication registry or an outbox, make them idempotent, and remove reliance on order across publishers.

I would use Modulith's verification test and its documentation to check boundaries continuously. Finally, I would only extract a module when there is a concrete reason, like a different scaling profile, release cadence or team ownership. Many systems get most of the benefit from being a well-structured modular monolith, and I would count that as success.

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 "Teams want to use in-process Spring events as the first step towards splitting a...": https://scrivio-interview-library.netlify.app/spring-boot/spring-events/5b9329e7af/