Use the MQI in a client application
This collection of topics considers the differences between writing the IBM MQ application to run in a message queue interface (MQI) client environment and to run in the full IBM MQ queue manager environment.
When you design an application, consider what controls we need to impose during an MQI call to ensure that the IBM MQ application processing is not disrupted.
Before we can run applications that use the MQI create certain IBM MQ objects. For more information, see Application programs using the MQI.
- Limiting the size of a message in a client application
A queue manager has a maximum message length, but the maximum size of message we can transmit from a client application is limited by the channel definition. - Choose client or server CCSID
Use the local coded character set identifier (CCSID) for the client. The queue manager performs necessary conversion. Use the MQCCSID environment variable to override the CCSID. If the application performs multiple PUTs, the CCSID and encoding fields of the MQMD can be overwritten after completion of the first PUT. - Use MQINQ in a client aplication
Some values queried using MQINQ are modified by the client code. - Use sync point coordination in a client application
An application running on the base client can issue MQCMIT and MQBACK, but the scope of the sync point control is limited to the MQI resources. We can use an external transaction manager with an extended transactional client. - Use read ahead in a client application
We can use read ahead on a client to allow non persistent messages to be sent to a client without the client application having to request the messages. - Use asynchronous put in a client application
Using asynchronous put, an application can put a message to a queue without waiting for a response from the queue manager. We can use this to improve messaging performance in some situations. - Use sharing conversations in a client application
In an environment where sharing conversations is permitted, conversations can share an MQI channel instance. - Use MQCONNX
We can use the MQCONNX call to specify a channel definition (MQCD) structure in the MQCNO structure.
Parent topic: Writing client procedural applications