Write broker Config.toml
mq_write_config_tomlWrite or update the broker connection Config.toml for an existing Ballerina project, setting the [org.project] table with broker URL and optional credentials. Overwrites the existing file.
Instructions
Write or rotate the broker connection Config.toml for an existing project. Sets the [org.project] table with brokerUrl and (optionally) username/password. Note: the acknowledgement mode and transacted flag live in listener.bal (compile-time annotation), so ack_mode/transacted here are written only as documented mirror comments. Overwrites the existing Config.toml.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ack_mode | No | Optional: documented mirror of the listener ack mode written as a comment (ack mode itself lives in listener.bal, not Config.toml). | |
| 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. | |
| 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 | Optional: documented mirror of the transacted flag (written as a comment). | |
| project_name | Yes | Ballerina package / project name. Becomes the folder <bi_path>/<project_name> and the package name. | |
| project_path | Yes | Absolute or ~/%USERPROFILE%-relative path to an existing scaffolded project root (the folder containing Ballerina.toml). |