connector
Last updated
Generate a Connector service (a Rumi message-bus binding to an external system).
rumi quickstart connector [options]--app-root
-r
Application root directory
rumi-quickstart
rumi quickstart connector --app-root my-appThe command scaffolds a complete, deployable microservice whose message bus is backed by a connector you write. The generated microservice includes its own Maven module, message model, configuration fragments, and launch scripts, plus a connector class implementing the four-method Connector contract:
open
Once, when the bus binding opens
Read configuration, connect to the external system
run
On a dedicated inbound thread
For a source connector, read from the external system and emit into Rumi via processInbound(...)
processOutbound
On each outbound message
For a sink connector, write the message out to the external system
close
Once, when the binding closes
Release connections and flush anything buffered
The generated connector body is a documented skeleton rather than a working integration. This is deliberate, and matches the processor and driver quickstart microservices, which are likewise scaffolding you fill in as you work through the tutorial.
A connector is a message-bus binding, not a bolt-on. The microservice generated here is a first-class Rumi microservice that happens to reach an external system through the connector you supply.
A natural first connector is one that writes each message it receives to a CSV file. Working outward from the skeleton:
In open, read the output path from configuration and open a writer for it.
In processOutbound, project the fields you care about off the outbound MessageView and append them as a row.
In close, flush and close the writer so no rows are lost on shutdown.
Because the connector is bound to the microservice through a connector:// bus binding in config.xml, nothing else in the application needs to change when you swap a CSV implementation for one that talks to a database, an object store, or a downstream API.
app - Generate a complete application
processor - Generate a Processor microservice
webservice - Generate a Webservice microservice
driver - Generate a Driver microservice
Last updated