Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Message Queue 3.5 SP1 C Client Developer's Guide 


This book provides programming and reference information for developers working with Sun Java™ System Message Queue (formerly Sun™ ONE Message Queue) 3.5 SP1, who want to use the C language binding to the Message Queue Service to send, receive, and process Message Queue messages.

This preface contains the following sections:

Audience for This Guide

This guide is meant for developers who want to use the C-API in order to write C messaging programs that can interact with the Message Queue broker to send and receive JMS messages.

Organization of This Guide

This guide is designed to be read from beginning to end. The following table briefly describes the contents of each chapter:

Table 1  Book Contents 



Chapter 1, "Introduction"

Introduces the basic concepts, operations, and architecture of Message Queue messaging. Contains some material on programming and configuration issues to improve performance and throughput.

Chapter 2, "Building and Running Message Queue C Clients"

Explains how to compile and link Message Queue C clients. Introduces the Message Queue C-Client sample applications that are shipped with Message Queue and explains how you set up your environment to run these examples.

Chapter 3, "Using the C API"

Explains how you use the C-API to construct, to send, to receive, and to process messages. This chapter also covers error and thread handling.

Chapter 4, "Reference"

Provides complete reference information for the Message Queue C-API: data structures and functions. It also lists and describes the contents of the C-API header files.

Appendix A, "Message Queue C API Error Codes"

Lists the code and descriptive string returned for errors that are returned by C library functions.


This section provides information about the conventions used in this document.

Text Conventions

Table 2  Document Conventions 




Italicized text represents a placeholder. Substitute an appropriate clause or value where you see italic text. Italicized text is also used to designate a document title, for emphasis, or for a word or phrase being introduced.


Monospace text represents example code, commands that you enter on the command line, directory, file, or path names, error message text, class names, method or function names (including all elements in the signature), package names, reserved words, and URL’s.


Square brackets to indicate optional values in a command line syntax statement.


Text in all capitals represents file system types (GIF, TXT, HTML and so forth), environment variables (IMQ_HOME), or acronyms (Message Queue, JSP).


Simultaneous keystrokes are joined with a plus sign: Ctrl+A means press both keys simultaneously.


Consecutive keystrokes are joined with a hyphen: Esc-S means press the Esc key, release it, then press the S key.

Directory Variable Conventions

Message Queue makes use of three directory variables, one of which is relevant to C clients. Table 3 describes this variable and explains how it is used on the Solaris, Windows, and Linux platforms.

Table 3  Message Queue Directory Variable Used by C Clients 




This is generally used in Message Queue documentation to refer to the Message Queue base directory (root installation directory):

  • On Solaris, there is no root Message Queue installation directory. Therefore, IMQ_HOME is not used in Message Queue documentation to refer to file locations on Solaris.
  • On Windows, the root Message Queue installation directory is set by the Message Queue installer (by default, as C:\Program Files\Sun\MessageQueue3).
  • On Linux, there is no root Message Queue installation directory. Therefore, IMQ_HOME is not used in Message Queue documentation to refer to file locations on Linux.

In this guide, IMQ_HOME is shown without platform-specific environment variable notation or syntax (for example, $IMQ_HOME on UNIX). Path names generally use UNIX directory separator notation (/).

Other Documentation Resources

In addition to this guide, Message Queue provides additional documentation resources.

The Message Queue Documentation Set

The documents that comprise the Message Queue documentation set are listed in Table 4 in the order in which you would normally use them.

Table 4  Message Queue Documentation Set 




Message Queue Installation Guide

Developers and administrators

Explains how to install Message Queue software on Solaris, Linux, and Windows platforms.

Message Queue Release Notes

Developers and administrators

Includes descriptions of new features, limitations, and known bugs, as well as technical notes.

Message Queue Java Client Developer’s Guide


Provides a quick-start tutorial and programming information for developers of Java client programs using the Message Queue implementation of the JMS or SOAP/JAXM APIs.

Message Queue Administration Guide

Administrators, also recommended for developers

Provides background and information needed to perform administration tasks using Message Queue administration tools.

Message Queue C Client Developer’s Guide


Provides programming and reference documentation for developers of Message Queue C client programs.

Online Help

Message Queue 3.5 SP1 includes command-line utilities for performing Message Queue message service administration tasks. To access the online help for these utilities, see the Message Queue Administration Guide.

Message Queue 3.5 SP1 also includes a graphical user interface (GUI) administration tool, the Administration Console (imqadmin). Context sensitive online help is included in the Administration Console.

Example Client Applications

A number of example applications that provide sample client application code are included in a directory that depends upon the operating system (see the Message Queue Administration Guide).

Sample applications that illustrate the C-API are listed and described in Chapter 2, "Building and Running Message Queue C Clients".

See the README file located in that directory for guidance on how to run the sample programs.

The Java Message Service (JMS) Specification

The JMS specification can be found at the following location:

The specification includes sample JMS Java client code.

Related Third-Party Web Site References

Third-party URLs are referenced in this document and provide additional, related information.


Sun is not responsible for the availability of third-party Web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused by or in connection with the use of or reliance on any such content, goods, or services that are available on or through such sites or resources.

Previous      Contents      Index      Next     

Copyright 2004 Sun Microsystems, Inc. All rights reserved.