Cross-Service Concerns Under LVD
Shared types, service-to-service calls and sagas all have a home in LVD. The network boundary needs no new layer rules, only a clear path through Resources.
An event is a letter posted to people you have never met. You cannot see their code, you do not know how many of them there are, and a typo in your envelope is their problem. Event-driven systems run on that arrangement, and the book's treatment of it is a good lens for deciding where each piece of the letter-handling belongs.
In the book's account, an event passes through several layers over its life. Its shape is first written down as a schema in Layer 1, either inside the producing service or in a shared package. When something happens, a Tool in the producing service does its business work, builds the event and hands it to a publisher. The publisher is a Resource that wraps the message broker, so the Tool calls downwards and never touches the broker directly.
On the receiving side the story starts at the edge. The book puts the consumer in the Resources layer of the receiving service, which fits: the broker is, after all, an external system. That consumer takes the message off the wire, validates it against the same schema, and passes the resulting event to a Tool, which carries out the receiving service's own business logic.
Both services therefore agree on exactly one thing: the schema. Everything else about each side can change independently.
The consumer is the one place in the receiving service where untyped data becomes a typed value. That makes it the natural spot for strictness. Before the parse you hold a string that anyone could have written; after it, every function downstream works with a value the compiler understands.
A sketch in a ride-sharing platform, where a billing service listens for finished trips:
// billing-service/src/resources/trip-consumer.ts
export const tripConsumer = createConsumer("trip-events", async (raw) => {
const parsed = TripCompletedSchema.safeParse(JSON.parse(raw));
if (!parsed.success) {
return deadLetter(raw, parsed.error); // set aside, do not crash the loop
}
await chargeForTrip(parsed.data); // a Tool takes over from here
});
Two habits are visible. The consumer decides what to do with a message it cannot read, which in practice usually means parking it somewhere inspectable (that part is general practice, not something from the book). And the Tool never sees the raw string, so its tests can pass in plain objects and never need a broker.
The book sets out this arrangement as a lifecycle with the consumer in Resources and the Tool behind it. If you adopt it, keep the consumer thin: parse, hand over, and nothing more. Business decisions made inside a consumer are hard to test and easy to forget.
The book makes a pointed argument about where event schemas go. Layer 1 is the most stable layer, and putting events there is deliberate, because it makes changing them hard on purpose. That friction matches reality. A producer cannot see its consumers, so the schema is the only thing keeping the system from silent breakage.
A practical way to honour that intent, which is my suggestion and not the book's, is to treat the schema folder as owned by every team that depends on it. Route changes to it through review by those teams, so that a small edit to an event is never a surprise to someone at the other end.
It also changes how you think about naming. A field name in an event schema will outlive the service that first emitted it, so it should be a word from the business, not a word from your database. The book covers concrete ways to evolve an event without breaking its readers, and that is where most of the depth lies.
Events do not escape layering; they make it more visible. The schema is a quiet, shared contract, the publisher and consumer are Resources that talk to the broker, and the Tools on either side deal only in typed values. For more detail, see domain events across layers, the wider cross-service concerns, and why Schema is your most stable code.