Naming Standards
Naming in Klok is structural. Names are parsed by humans, tools, CI/CD, generated documentation, Integration Context, logs, and access systems.
Tenant And Domain Names
Use the same tenant and domain names across GitLab, Vault, Pulsar, Keycloak, OpenSearch, and the admin GUI. Inconsistent names create access and observability problems.
Common domains:
common: tenant-wide shared assets.public: externally published artifacts.- Business domains such as
finance,hr, orlogistics.
Solution And Route IDs
A solution groups related route legs. Its id is the tenant's three-letter short code and the solution's number; a route id adds the leg and a sequence, which makes the route type visible.
ACM001 Solution 1 of tenant acme (short code ACM)
ACM001I1 Ingress leg 1
ACM001P1 Processing leg 1
ACM001E1 Egress leg 1
The legs are I ingress, P processing, E egress, A API, S sub route and T timer. The framework's
Naming page has the full rule.
Java Class Names
A route's class name is its route id followed by a meaningful route name.
ACM001I1_CustomerImportOnramp
ACM001P1_CustomerValidationProcessor
ACM001E1_CustomerExportOfframp
Do not publish a route without an integration solution. Without a solution, the route lacks stable business context.
Topic Names
Preferred topic structure:
persistent://<tenant>[_<env>]/<domain>/<InformationModelName>[_<event_purpose>]
Production has no environment suffix. Request/reply topics are ReqRes_<Request>_<Reply>[_<purpose>]_Request and
_Response, and dead letters <topic>_DLQ. A topic name never has a second suffix: it names what is published, not who
reads it. A reader, also in another tenant, is known by its subscription, whose name is its route id
(ACM012E1_DeliveryNotice).
Examples:
persistent://acme_dev/finance/InvoiceV1_Created
persistent://acme/common/CustomerGlobalV1_Changed
Rules:
- Include the major version in the model name, such as
InvoiceV1. - Do not add a separate semver segment like
1.0.0to the topic name. - Keep event purpose optional but meaningful. The publisher sets it, as the solution requires, to split one datamodel into several flows, and the reader consumes the purpose the publisher chose; see Topic Purpose.
- Never put
_inside a purpose: it separates the purpose from the model and from_DLQ. - Avoid generic topic names such as
eventsordata. - Broker topics should normally carry Class B or C models.
GitLab Paths
Typical path patterns:
/<tenant>/integration/domain/<domain>/<project>
/<tenant>/datamodel/public/<model>-v<n>
/<tenant>/datamodel/common/<model>-v<n>
/<tenant>/datamodel/domain/<domain>/<model>-v<n>
/<tenant>/datamodel/system/<system>/<model>-v<n>
/<tenant>/documentation/integration/domain/<domain>/<project>
/<tenant>/documentation/datamodel/<same path as the datamodel>
/<tenant>/environment/<tenant>-deploy-manifests
The datamodel path follows the model's class (public, common, domain or system); see Creating A Datamodel. Follow the platform helper behavior and avoid inventing new path structures for one project.
Vault Paths
Secret paths start with the tenant. The ones services and pipelines read:
secret/<tenant>/integration/<name>/env an integration service's runtime configuration
secret/<tenant>/application/<name>/env an application's runtime configuration
secret/<tenant>/common/repo/cicd-environment-variables the tenant's CI environment
secret/<tenant>/CICD_KEY, secret/<tenant>/KNOWN_HOSTS the tenant's CI deploy key and pinned host key
Secrets And Configuration in the Klok framework development guide is the reference. Store references and requirements in metadata. Do not store secret values in the admin database, Git, prompts, issues, or docs.
OpenSearch Fields
Every route's log events and the transactions Klok builds from them carry the same fields, written by KLK001's log receivers, so one search or one alert works for every integration. The ones you search on most:
klok_tenant,klok_domain,klok_env.solution_id,route_id(on a transactionroute_ids),route_instance.correlation_id.status,duration_ms,error_code.file_flow_id,file_name,file_sha256,file_statefor KLK017 file transfers.
Every field and its values are in KLK001's Log receivers and chain status (klok-egress-opensearch); Finding And Searching Logs In OpenSearch Dashboards shows how to use them.