A number of sample applications are supplied with XMS. The samples provide an overview of the common features of each API. You can use these sample applications to verify your installation and messaging server setup, and also for guidance in building your own applications.
These samples are not intended to exercise the whole of the API, but rather to provide an overview of how to use some of the most common features. They are subject to change in future releases of XMS.
If you require guidance on how to create your own applications, use the sample applications as a starting point. Look through the sample source code and identify which key steps you need to perform to create each object that you need for your application (connection factory, connection, session, destination, and either a producer, or a consumer, or both), and to set any specific properties that are needed to specify how you want your application to work. For additional information, see Writing XMS applications.
Table 1 shows the three sets of sample applications that are supplied with XMS. There is one set for each API.
Name of sample | Description |
---|---|
SampleConsumerC SampleConsumerCPP SampleConsumerCS |
A message consumer application that consumes messages on to a queue or topic. |
SampleProducerC SampleProducerCPP SampleProducerCS |
A message producer application that produces messages from a queue or topic. |
SampleConfigC SampleConfigCS |
A configuration application that allows you to create a file-based administered object repository containing a connection factory and destination for your particular connection settings. This administered object repository can then be used with each of the sample consumer and producer applications. |
The corresponding samples for the different APIs support the same functionality, but have some syntactical differences.
Both the source and a compiled version are provided for each application.
The samples can operate in one of two modes:
All the samples are compatible and can therefore inter-operate across languages. For example, the SampleConsumerCPP application can inter-operate with the Sample ProducerCS application.
To find out where the sample applications for Message Service Client for C/C++ are installed:
To find out where the sample applications for Message Service Client for .NET are installed, see What is installed on Windows (.NET).