Sample code for setting up the server for use with WMQ
After you install either the IBMWebSphere MQ (WMQ) server or both the WMQ server and client, you can set up the database server for use with WMQ.
The following example shows how to set up the database server for MQ:
- Open DB-Access and the stores_demo database.
- Run the following commands:
-- Service for most operations INSERT INTO mqiservice (servicename, queuemanager, queuename) VALUES ('lser.qm1', 'lqm1', 'IDS.DEFAULT.QUEUE'); -- Service for publishing INSERT INTO mqiservice (servicename, queuemanager, queuename) VALUES ('lpubser.qm1', 'lqm1', 'SYSTEM.BROKER.DEFAULT.STREAM'); -- service for subscribing INSERT INTO mqiservice (servicename, queuemanager, queuename, mqchllib, mqchltab) VALUES ('lsubser.qm1', 'lqm1', 'SYSTEM.BROKER.CONTROL.QUEUE'); -- service for receiving subscribe message INSERT INTO mqiservice (servicename, queuemanager, queuename, mqchllib, mqchltab) VALUES ('lrecsubser.qm1', 'lqm1', 'IDS.DEFAULT.SUBSCRIBER.RECEIVER.QUEUE'); -- subscriber information INSERT INTO mqipubsub (pubsubname, servicebroker, receiver,psstream,pubsubtype) VALUES ('lsub.qm1', 'lsubser.qm1', 'lrecsubser.qm1', 'SYSTEM.BROKER.DEFAULT.STREAM', 'Subscriber'); -- publisher information INSERT INTO mqipubsub (pubsubname, servicebroker, receiver,psstream, pubsubtype) VALUES ('lpub.qm1', 'lpubser.qm1', '', '', 'Publisher');