Scaffold ActiveMQ BI project
mq_scaffold_projectGenerate a complete, runnable WSO2 Integrator Ballerina project for ActiveMQ, removing manual setup by producing producer/consumer code, listener services, transaction support, and Docker Compose.
Instructions
MAIN tool. Generate a complete, runnable WSO2 Integrator (BI) Ballerina project that integrates with ActiveMQ via the ballerinax/activemq connector. Creates Ballerina.toml (with the connector pinned from the local repository), Config.toml (+ .example, gitignored), .gitignore, main.bal (producer/consumer client demo), listener.bal (the polling-loop carrier with one declarative service activemq:Service on mqListener per destination) when include_listener is set, transactions.bal when transacted is set, a modules// helper per destination, a docker-compose.yml (apache/activemq-classic), and a README. Acknowledgement mode is baked into the listener's @activemq:ServiceConfig. If transacted=true conflicts with ack_mode, transacted wins (SESSION_TRANSACTED) and a warning is returned. Writes files to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bi_path | Yes | WSO2 Integrator (BI) workspace path the project folder is created under. Supports ~ (POSIX) and %USERPROFILE% (Windows) expansion. Defaults: ~/WSO2Integrator (macOS/Linux), %USERPROFILE%\WSO2Integrator (Windows). | |
| ack_mode | No | Acknowledgement mode baked into the listener's @activemq:ServiceConfig: auto=AUTO_ACKNOWLEDGE (default), client=CLIENT_ACKNOWLEDGE (manual caller->acknowledge), dups-ok=DUPS_OK_ACKNOWLEDGE, transacted=SESSION_TRANSACTED (caller->'commit()/'rollback()). | auto |
| org_name | Yes | Ballerina package organisation name (e.g. "acme"). Used in Ballerina.toml and the Config.toml table header [org.project]. | |
| password | No | Broker password (must be paired with username). Omit for an unauthenticated broker. | |
| username | No | Broker username (must be paired with password). Omit for an unauthenticated broker. | |
| overwrite | No | When true, overwrite an existing project folder. When false, the tool refuses if the folder already exists. | |
| broker_url | No | OpenWire broker URL. Supported forms: tcp://host:61616 (default), ssl://host:61617, or failover:(tcp://h1:61616,tcp://h2:61616). Example: tcp://localhost:61616 | tcp://localhost:61616 |
| transacted | No | When true, generate transactions.bal and force SESSION_TRANSACTED on the listener (overrides ack_mode with a warning). | |
| destinations | Yes | One or more destinations to wire up. Each generates a modules/<name>.bal helper, and (if include_listener) a listener service. | |
| project_name | Yes | Ballerina package / project name. Becomes the folder <bi_path>/<project_name> and the package name. | |
| include_listener | No | When true, generate listener.bal — the polling-loop carrier — with a service per destination. |