04 Integration Projects And Routes

Integration Projects And Routes

An integration project is a Git repository that contains one or more route legs. A route leg is a runnable piece of integration behavior, usually built with a Klok framework base class.

Project Responsibilities

An integration project should contain:

  • Route classes.
  • Project metadata.
  • References to data model dependencies.
  • Tests and configuration.
  • Generated or maintained documentation inputs.
  • CI/CD configuration inherited from the template.

The template, Gradle plugin, and Quarkus extension should provide the build system, standard dependencies, publishing behavior, and runtime conventions. Developers should not handcraft the base project mechanics.

Route Leg Types

Leg Type Purpose Typical Base Class
Ingress: Onramp Bring data onto the broker and map Class X to Class B/C KlokOnrampRoute
Processing Transform, enrich, split, aggregate, or bridge on the broker (topic → topic) KlokProcessingRoute
Egress: Offramp Take data off the broker and map Class B/C to Class X KlokOfframpRoute
Ingress or egress: Channel Adapter Convert the protocol only; the payload stays as received KlokChannelAdapterSourceRoute or KlokChannelAdapterSinkRoute
Custom Implement special routing while keeping Klok standards KlokCustomRoute
Sync Bridge Support request-reply where unavoidable KlokOnrampRouteSync or related sync patterns

An ingress takes a message from outside onto the broker, an egress takes it off the broker to the outside. Onramp and channel adapter are the two forms of an ingress: an onramp maps, a channel adapter only converts the protocol. When a channel adapter is the better design, and when a system's format on the broker is an anti-pattern, is explained in Ingress, egress, onramp and channel adapter.

Route Metadata

A route should have enough stable metadata for the context graph and operations:

  • Solution key and route ID.
  • Route type.
  • Class name and package.
  • Base class or route pattern.
  • Source and target URI.
  • Source and target systems.
  • Consumed and published topics.
  • Data models used.
  • Correlation and tracing behavior.

Route Flow

Developer Responsibility

The framework handles common platform mechanics. The developer remains responsible for:

  • Correct business transformation.
  • Correct source and target configuration.
  • Meaningful tests.
  • Honest design documentation.
  • Clear handling of edge cases.
  • Avoiding hidden coupling and forbidden tactics.