Chapter 5. Using MRG Messaging with C++
This chapter shows how to write direct, fanout, publish/subscribe, request/response, and XML-based routing programs in Python. These concepts are explained in Chapter 2, Examples Overview. It then shows how to use important features like persistence and transactions with MRG Messaging. This chapter does not try to teach the entire MRG Messaging C++ API, and it is not encyclopedic in its coverage of AMQP. For more detailed information on the C++ API for MRG Messaging, see the Doxygen documentation installed at /usr/share/doc/qpidc-devel-0.2/html/index.html. For more detailed information on the AMQP model, see the AMQP specification at http://www.amqp.org.
The instructions in this section assume you have installed the client libraries and started a broker using the instructions shown in Chapter 3, Installing MRG Messaging.
Before running the examples, you need to compile the files using the make command.
$ make filename
The binaries created by the make command are standard Linux binaries, and can be run from the command line using ./ before the name of the executable:
$ ./filename
In order to use make, you must have write privileges for the working directory. This generally means that you should copy the /usr/share/rhm-docs-0.2/cpp directory to a place where you can modify the code and create subdirectories as part of the compilation process.
For more information on downloading, installing and starting the broker refer to the MRG Messaging Installation Guide