- Purpose
- Files
- Prerequisites
- Configuration
- Quick start
- Seed objects
- Verification workflow
- Integration test scaffolding
- Reset workflow
- Troubleshooting
Provide a repeatable, containerized IBM MQ queue manager for local development and integration testing so MQSC/PCF mapping assumptions can be verified against real command responses.
scripts/dev/mq_start.sh— wrapper delegating tomq-rest-admin-dev-environmentscripts/dev/mq_stop.sh— wrapper delegating tomq-rest-admin-dev-environmentscripts/dev/mq_reset.sh— wrapper delegating tomq-rest-admin-dev-environmentscripts/dev/mq_seed.sh— wrapper delegating tomq-rest-admin-dev-environmentscripts/dev/mq_verify.sh— wrapper delegating tomq-rest-admin-dev-environment
Docker Compose, MQSC seed files, and web server configuration are owned by the mq-rest-admin-dev-environment repository.
- Docker Desktop or compatible Docker Engine.
- IBM MQ container image access (license acceptance required).
- The
mq-rest-admin-dev-environmentrepository cloned as a sibling directory (../mq-rest-admin-dev-environment), or setMQ_DEV_ENV_PATHto its location.
- Image:
MQ_IMAGE(defaults toicr.io/ibm-messaging/mq:latest). - Queue managers:
QM1andQM2on a shared Docker network (mq-dev-net). - QM1 ports:
1414: MQ listener.9443: mqweb console + REST API.
- QM2 ports:
1415: MQ listener.9444: mqweb console + REST API.
- Embedded web server:
MQ_ENABLE_EMBEDDED_WEB_SERVER=truein the compose file. - Credentials (REST + console):
mqadmin/mqadmin(admin)mqreader/mqreader(read-only)
- The compose file sets
LICENSE=accept. You must accept the IBM MQ container license before running the image.
-
Start the queue manager:
./scripts/dev/mq_start.sh
-
Seed deterministic objects:
./scripts/dev/mq_seed.sh
-
Verify REST-based MQSC responses:
./scripts/dev/mq_verify.sh
The seed script defines a small, deterministic set of queues, channels, and
related objects with a DEV. prefix. Re-run the seed at any time; all
definitions use REPLACE to stay idempotent.
The verification script posts runCommandJSON requests to the admin REST API
and prints structured JSON responses for:
DISPLAY QLOCAL(DEV.QLOCAL)DISPLAY CHANNEL(DEV.SVRCONN)
Payload shape (validated in this container):
{
"type": "runCommandJSON",
"command": "DISPLAY",
"qualifier": "QLOCAL",
"name": "DEV.QLOCAL"
}Notes:
commandmust be the MQSC verb (for example,DISPLAY).qualifierselects the object type (QMGR,QLOCAL,CHANNEL, etc.).nameis required for object-specific queries (not required forQMGR).
Queue manager example (no name required):
{
"type": "runCommandJSON",
"command": "DISPLAY",
"qualifier": "QMGR"
}Response shape (abbreviated):
{
"commandResponse": [
{
"completionCode": 0,
"reasonCode": 0,
"parameters": {
"queue": "DEV.QLOCAL",
"defpsist": "YES",
"descr": "dev local queue"
}
}
],
"overallReasonCode": 0,
"overallCompletionCode": 0
}Defaults:
- REST base URL:
https://localhost:9443/ibmmq/rest/v2 - Admin user:
mqadmin - Admin password:
mqadmin
Override these via environment variables if needed:
MQ_REST_BASE_URLMQ_ADMIN_USERMQ_ADMIN_PASSWORD
Integration tests live in tests/integration/test_mq_integration.py. The tests
are skipped by default and require an explicit opt-in:
MQ_REST_ADMIN_RUN_INTEGRATION=1 uv run pytest -m integrationWhen enabled, the tests:
- start the local MQ container (
scripts/dev/mq_start.sh) - wait for the REST endpoint to become ready
- seed deterministic objects (
scripts/dev/mq_seed.sh) - run DISPLAY checks plus define/alter/delete lifecycles for
DEV.TEST.*objects - stop the container after the session (
scripts/dev/mq_stop.sh)
If you need a fully clean slate before the run, use ./scripts/dev/mq_reset.sh
to remove the data volume.
To return to a clean, known state (including removing the queue manager data volume):
./scripts/dev/mq_reset.sh-
If the REST API is not reachable from the host, run:
docker compose -f ../mq-rest-admin-dev-environment/config/docker-compose.yml exec -T qm1 \ setmqweb properties -k httpHost -v "*"
Then restart the container and retry the verification workflow.