Designing the C "HelloWorld" application

This application aims to create and use a single queue manager with a local queue. It involves putting a message to the local queue and then removing it.

You can create queue managers for use by one program. Once this program has completed, you can run a second program that reinstates the previous queue manager configuration.

Typically, configuring new entities is a separate process from their actual use. Once configured, administering these entities also requires a different process than using them. This section concentrates on usage rather than administration. The WebSphere MQ Everyplace Configuration Guide contains information on configuring and administering resources.

Assuming that the queue manager entity has already been configured, the HelloWorld application has the following flow for both the C and Java codebases:

  1. Start the queue manager
    This starts the queue manager based on information already created
  2. Create a message
    Creates a structure that you can use to send a message from one queue manager to another
  3. Put to a local queue
    Puts the message on the local queue
  4. Get from a local queue
    Retrieves the message from the local queue and checks that the message is valid
  5. Shutdown
    Clears and stops the queue manager
Note:
The C codebase does not have an equivalent of the Java Garbage Collection function. Therefore, clearing the queue manager features more strongly in C.


© IBM Corporation 2002. All Rights Reserved