The diagram below illustrates the architecture of a typical MQSeries installation and a D3 Server equipped with the D3 MQSeries Server Interface. The D3 MQSeries Server Interface is a combination of FlashBASIC programs and C functions that directly interface with the MQSeries MQI library. The MQI library is linked to the D3 engine making it part of D3. The FlashBASIC subroutines are used to interface with the MQI function calls. This makes it totally transparent to the BASIC developer.
The BASIC program examples below show how to use D3 MQSeries Server Interface and FlashBASIC API calls to interface with a Queue Manager.
To read a message from the Queue:
Call | Description |
---|---|
Call MQConn() | Opens a connection to the Queue Manager. |
Call MQOpen() | Opens the Message Queue to get the message from. |
Call MQGet() | Gets the message from the open queue. |
Call MQClose() | Closes the Message Queue previously opened. |
Call MQDisc() | Closes the connection from the Queue Manager. |
To send a message to the Queue:
Call | Description |
---|---|
Call MQConn() | Opens a connection to the Queue Manager. |
Call MQOpen() | Opens the Message Queue to put the message to. |
Call MQPut() | Writes/Puts the message to the open queue. |
Call MQClose() | Closes the Message Queue previously opened. |
Call MQDisc() | Closes the connection from the Queue Manager. |
As shown in the examples above, reading from and writing to a queue is a simple process. Because the MQSeries Queue Manager handles everything, the BASIC developer does not need to know or worry about network protocols or how to communicate with remote systems. The BASIC programs that use the D3 MQSeries Server Interface are capable of exchanging information with any MQSeries supported platforms and applications.
Other MQI calls are available in order to manage a Queue Manager. These include:
Call | Description |
---|---|
MQBegin | Begin a unit of work. |
MQBack | Back out of an uncommitted unit of work. |
MQCMIT | Commit to a unit of work. |
MQPut1 | Open a queue, place a message in the queue, and then close the queue. |
MQInq | Inquire about a queue’s attribute. |
MQSet | Set queue attributes. |
For more information on these MQI calls, see the MQSeries User’s Guide.