分类:
2006-08-23 17:28:34
WebSphere MQ/MQSeries client software is distributed as a part of WebSphere MQ suite and it can also be downloaded for FREE from IBM for various platforms. A WebSphere MQ client application interacts with one or more queue managers through MQI channels (such as server-connection channel and client-connection channel) using a communications protocol. The client application executes in synchronous mode since the client doesn't host any transmission queues or communication channels (such as sender-channel and receiver-channel). The client connects to a queue manager by issuing a MQCONN or MQCONNX call and it stays connected to the queue manager until is issues a MQDISC call. It is possible to connect to multiple queue managers concurrently in a single thread of your MQ client application.
The client applications are written using MQI in C, C++, Java, COBOL, Visual Basic and PL/I languages (not all languages are supported on all platforms). In this article, I will explain how to develop a simple WebSphere MQ client application using the C++ classes supplied with the WebSphere MQ. These classes simplify the usage of various MQSeries data structures and objects. Yes, you no longer have to manage the size of the message buffers :)
In the following sections, we will develop a simple client application that connects to a queue manager (named QM1) and opens two queues (named IN and OUT). It gets a message from one queue (IN) and posts it to another queue (OUT). The communication protocol of our choice is TCP/IP.
|