Your First Integration Project
This walkthrough shows the normal path from a business need to a first production-ready integration project.
Example Scenario
The finance domain needs customer data from a CRM system to reach an accounting system. The source is a REST API. The target system consumes a JMS queue. The business wants updates within five minutes.
Step 1: Write The Business Need
Start in plain language:
# Solution: Customer Synchronization
## Business Need
Synchronize customer data from CRM to the accounting system so invoices use correct customer information.
## Source System
CRM REST API owned by Sales.
## Target System
Accounting JMS interface owned by Finance.
## Business Goal
Reduce manual customer registration and avoid incorrect invoices.
## Service Level Requirement
Updates should normally arrive within five minutes.
## Volume
Approximately 500 customers per day, with peaks around 50 per minute.
Do not start with a Java class. Start with the outcome, ownership, systems, data, and reliability expectations. Describing The Business Need has the full template and what each answer is for.
Step 2: Search For Reuse
Use Build → Context graph and Ask Kloker in klok.dev to check whether the landscape already contains:
- A reusable customer data model.
- Existing CRM or accounting system projects.
- A solution with similar route legs.
- Existing topics that carry the right event contract.
- Known operational constraints for the systems.
Reuse is valuable only when ownership and contracts match. Do not reuse a topic just because its name looks close. Finding What Already Exists lists where to look and how to choose between reusing, extending and building.
Step 3: Create Or Select A Data Model
Data shared between systems should travel on the broker as Class B or Class C. For this example, the CRM payload is Class X and should be transformed at the onramp. The accounting payload is also Class X and should be produced at the offramp.
A typical internal model might be CustomerGlobalV1 or FinanceCustomerV1, depending on scope.
Step 4: Create The Integration Solution
Create the integration solution Customer Synchronization with its solution id, here ACME001, and its solution
document in the tenant's integration-solutions repository (From Requirement To
Design, step 7). The id is the prefix of every route id of
the solution, such as ACME001I1_CrmCustomerOnramp and ACME001E1_AccountingCustomerOfframp, which keeps the routes,
topics, logs and documentation traceable to the solution.
Step 5: Design Route Legs
A minimal design:
Expected route patterns:
- Onramp:
KlokOnrampRoute<CrmCustomer, CustomerGlobalV1>. - Offramp:
KlokOfframpRoute<CustomerGlobalV1, AccountingCustomer>. - Processing route only if validation, enrichment, splitting, aggregation, or cross-model transformation is needed.
Step 6: Create The Integration Project
Create the project from the integration template. The template supplies Gradle, wrapper files, standard structure, framework dependencies, Quarkus integration, and example conventions. The project code should focus on route legs and business transformations.
Step 7: Implement The Routes
Implement only the methods that belong to the selected route pattern. For example, an onramp typically implements source URI and body transformation from system format to domain/global model. An offramp typically implements target URI and body transformation from domain/global model to target system format.
Step 8: Test And Review
Before publishing:
- Test transformations with representative payloads.
- Test invalid payloads and expected DLQ behavior.
- Confirm CloudEvent metadata and correlation behavior.
- Confirm topics follow naming standards.
- Confirm access and secrets are configured outside code.
- Confirm generated documentation and Integration Context are updated by the pipeline.
Step 9: Monitor First Runtime
After deployment, use Run → Repositories, Run → Broker and Build → Context graph in klok.dev, and the services' logs, to verify:
- Route services are healthy.
- Messages are flowing through expected topics.
- Logs include
tenant,domain,solutionId,integrationId, andcorrelationId. - No unexpected DLQ growth appears.
- Generated docs match the implementation.