Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

dev

⚠️ In Development: The rumi dev command is currently in development. The content in this section is subject to change.

The rumi dev commands incrementally evolve an existing Rumi application: adding, removing, and inspecting microservices, model types, connectors, and configuration, without hand-editing XML or writing boilerplate.

Command Structure

Every command follows the same shape:

rumi dev <category> <action> [options]

Where <category> is the kind of thing being managed and <action> is one of list, get, add, remove, or a category-specific verb.

Categories

Category
Manages

app

Inspect scaffolded Rumi apps

service

Microservices (processor, driver, connector, webservice)

handler

@EventHandler methods in a microservice's Main.java

message

X-ADML message type definitions

entity

Embedded entity definitions in the message model

state

X-ADML state entity definitions

field

Fields on a message or entity

collection

X-ADML collection declarations

operation

API operations in a microservice's api.xml

connector

Custom connectors snapped into a microservice

config

X-DDL config fragments and schema validation

factory-id

Global factory ID inspection

Run rumi dev <category> --help for a category's actions and options.

Common Options

These recur across the commands:

Option
Short
Description

--app-root

-a

Application root. Required, and must be an absolute path

--field

-f

Repeatable field spec, name:type[:modifier...]

--attr

Repeatable type-level attribute, key=value

--scope

Which model the edit lands in. See Model Scope

--force

Override a referential-safety block. See Referential Safety

--dry-run

Report what would change without writing

--json

Emit structured output

Every mutating command reports a change set, so you can see exactly which files were touched:

Field Specs

Fields are given as name:type, with optional modifiers:

Field types are canonicalized to their ADML scalar names on write, so the Java primitive spellings you are used to are accepted and stored canonically. int becomes Integer, double becomes Double, string becomes String. Names that are not recognized scalar aliases, such as entity and message references, pass through untouched.

Model Scope

--scope selects which model file an edit lands in:

Scope
Model

service-messages

The microservice's own message model

service-state

The microservice's state model

roe-messages

The application-wide ROE model, shared across microservices

The default is service-messages for messages, entities, and fields, and service-state for collections.

Use roe-messages for a message several microservices exchange. Note where the change lands:

Referential Safety

Removing a type that is still referenced is blocked, and the error names every referrer:

Remove the references first, or pass --force to remove anyway. Forcing leaves the referring fields pointing at a type that no longer exists, so prefer removing the references.

IDs Are Never Reused

Model types, fields, and collections each carry an ID that identifies them on the wire, and removing one never returns its ID to the pool. A removed element leaves a reserved tombstone behind:

This is deliberate: recycling the ID of a removed element would let a peer running the older model misinterpret the new one. Model element IDs are allocated high-water-mark plus one. Factory IDs take the lowest ID that has never been allocated, skipping reserved ones, so rumi dev factory-id next can appear to skip numbers. That is correct behaviour rather than a defect.

Categories in Detail

app

service

TYPE is processor, driver, connector, or webservice. The HA model applies to the clusterable types, processor and webservice, and is STATE_REPLICATION (default) or EVENT_SOURCING.

add has no --dry-run: it writes a whole module subtree, scripts, and config fragments, and the underlying builder has no preview mode. Scaffold into a throwaway app if you want to inspect the result first.

message

entity

Embedded entities in the message model. For a microservice's state entities, use state.

state

--attr sets entity-level attributes:

field

Every action names both the microservice and the owning message or entity.

deprecate marks a field deprecated while keeping it on the wire, which is the compatible way to retire one. delete removes it outright and retires its ID. rename keeps the ID, so it stays wire-compatible.

collection

--contains is a verbatim type reference: it names an entity or message type exactly as spelled in the model and is not canonicalized.

operation

Omit --out for a one-way operation.

connector

A connector is a message-bus binding to an external system, and can be snapped into any microservice regardless of its type. This is distinct from the connector microservice type that rumi quickstart connector scaffolds.

add generates the connector skeleton class and the connector:// bus binding that wires it into the microservice.

handler

--body is optional; the handler gets an empty TODO body when it is omitted.

config

get prints the rendered config.xml. add takes the fragment from a file or from stdin with -. remove needs at least one of --tag or --name. validate exits non-zero on any ERROR or FATAL; a warning-only run exits 0.

factory-id

Common Workflows

Building out a microservice

Evolving a model compatibly

Sharing a message between microservices

Reaching an external system

Best Practices

  1. Preview first - --dry-run shows the change set without writing.

  2. Deprecate rather than delete - keeps peers on the older model working.

  3. Put shared messages in ROE scope - a message two microservices exchange belongs in roe-messages, not in one of them.

  4. Remove references before types - prefer that to --force.

  5. Use version control - commit after each change, so a change set is easy to review.

  • quickstart - Generate a new application to evolve

  • set - CLI settings, including full stack traces on failure

  • Core Documentation - Developing Rumi applications

Last updated