There is a whole set of sample programs available to the WebSphere MQ administrator. We are interested in only a couple of them: the program to put a message onto a queue and a program to retrieve a message from a queue. The names of these sample programs depend on whether we are running WebSphere MQ as a server or as a client.
There is a server sample program called amqsput
, which puts messages onto a queue using the MQPUT
call. This sample program comes as part on the WebSphere MQ samples installation package, not as part of the base package—see the Q replication constituent components section of Chapter 1, Q Replication Overview.
Note
The maximum length of message that we can put onto a queue using the amqsput
sample program is 100 bytes.
There is a corresponding server sample program to retrieve messages from a queue called amqsget
.