Set acknowledgement mode
mq_set_ack_modeSet acknowledgement mode for ActiveMQ listener services by rewriting sessionAckMode in listener.bal and adjusting onMessage to match (auto, client, dups-ok, transacted).
Instructions
Set/update the acknowledgement mode on listener service(s) by editing listener.bal in place. Rewrites sessionAckMode in the @activemq:ServiceConfig annotation and regenerates the affected onMessage to match (adds/removes the activemq:Caller parameter and the acknowledge / commit+rollback calls). Targets one service by service_name, or all services when omitted. Ack mode cannot live in Config.toml (it is a compile-time constant), which is why this edits source. Modifies a .bal file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ack_mode | Yes | New acknowledgement mode. The tool rewrites sessionAckMode in the listener.bal @activemq:ServiceConfig and adjusts the onMessage signature (adds/removes the Caller parameter + ack/commit calls) to match. | |
| project_path | Yes | Absolute or ~/%USERPROFILE%-relative path to an existing scaffolded project root (the folder containing Ballerina.toml). | |
| service_name | No | Target a specific service by name. When omitted, all services in listener.bal are updated. | |
| listener_file | No | Listener source file (relative to project_path) to edit. Defaults to listener.bal. | listener.bal |