MRG Messaging

MRG Messaging

AMQP Programming Tutorial for C++, Java, and Python

Jonathan Robie

Edited by

Lana Brindley

Content Author
Red Hat
Legal Notice
Abstract

This book shows you how to write programs for the MRG Messaging component of the Red Hat Enterprise MRG distributed computing platforming using the Apache Qpid API. It also gives basic information on downloading and installing MRG Messaging. For more complete information on how to download and install MRG Messaging see the MRG Messaging Installation Guide.


Preface
1. Document Conventions
2. We Need Feedback!
1. Initial Concepts
1.1. Fanout Exchange
1.2. Direct Exchange
1.3. Topic Exchange
1.4. Custom Exchange Types
2. Examples Overview
3. Installing MRG Messaging
3.1. Installing MRG Messaging on Red Hat Enterprise Linux 5
3.2. Installing MRG Messaging on Red Hat Enterprise Linux 4
3.3. Starting the Broker
4. Using MRG Messaging with Python
4.1. Creating and Closing Sessions
4.2. Writing Direct Applications in Python.
4.2.1. Running the Direct Examples
4.2.2. Declaring and Binding a Queue
4.2.3. Publishing Messages to a Direct Exchange
4.2.4. Reading Messages from the Queue
4.2.5. Reading Messages from a Queue using a Listener
4.3. Writing Fanout Applications in Python
4.3.1. Running the Fanout Examples
4.3.2. Consuming from a Fanout Exchange
4.3.3. Publishing Messages to the Fanout Exchange
4.4. Writing Publish/Subscribe Applications in Python
4.4.1. Running the Publish-Subscribe Examples
4.4.2. The Topic Publisher
4.4.3. The Topic Subscriber
4.5. Writing Request/Response Applications in Python
4.5.1. Running the Request/Response Examples
4.5.2. The Server Application
4.5.3. The Client Application
4.6. XML-based Routing in Python
4.6.1. Running the XML-based Routing Examples
4.6.2. Declaring an XML Exchange, Declaring and Binding a Queue
4.6.3. Publishing to an XML Exchange
4.6.4. Reading from the Message Queue
4.7. Durable Queues and Durable Messages in Python
4.8. Using Transactions in Python
4.9. Logging in Python client applications
5. Using MRG Messaging with C++
5.1. Creating and Closing Sessions
5.2. Writing Direct Applications in C++
5.2.1. Running the Direct Examples
5.2.2. Declaring and Binding a Queue
5.2.3. Publishing Messages to a Direct Exchange
5.2.4. Reading Messages from the Queue
5.3. Writing Fanout Applications in C++
5.3.1. Running the Fanout Examples
5.3.2. Consuming from a Fanout Exchange
5.3.3. Publishing Messages to the Fanout Exchange
5.4. Writing Publish/Subscribe Applications in C++
5.4.1. Running the Publish-Subscribe Examples
5.4.2. Publishing Messages to a Topic Exchange
5.4.3. Reading Messages from the Queue
5.5. Writing Request/Response Applications in C++
5.5.1. Running the Request/Response Examples
5.5.2. The Client Application
5.5.3. The Server Application
5.6. XML-based Routing in C++
5.6.1. Running the XML-based Routing Examples
5.6.2. Declaring an XML Exchange, Declaring and Binding a Queue
5.6.3. Publishing to an XML Exchange
5.6.4. Reading from the Message Queue
5.7. Durable Queues and Durable Messages in C++
5.8. Using Transactions in C++
5.9. Optimizing message transfer with asynchronous sessions in C++
5.10. Using logging in C++
6. Using MRG Messaging with Java JMS
6.1. Java JMS Client Compatibility and Interoperability
6.2. Creating and Closing Connections and Sessions with JNDI
6.2.1. Basic JNDI Programming for MRG Messaging
6.2.2. JNDI Properties for MRG Messaging
6.2.3. Connection URLs
6.2.4. Binding URLs
6.3. Creating and Closing Connections and Sessions with AMQP
6.4. Writing Direct Applications in Java JMS
6.4.1. Running the Direct Examples
6.4.2. JNDI Properties
6.4.3. Publishing Messages to a Queue
6.4.4. Reading Messages from the Queue with a Message Consumer
6.4.5. Reading Messages from the Queue using a Message Listener
6.5. Writing Fanout Applications in Java JMS
6.5.1. Running the Fanout Examples
6.5.2. JNDI Properties
6.5.3. Reading Messages from a Queue with a Message Consumer
6.5.4. Reading Messages from the Queue using a Message Listener
6.5.5. Publishing Messages to a Fanout Exchange
6.6. Writing Publish/Subscribe Applications in Java JMS
6.6.1. Running the Publish/Subscribe Examples
6.6.2. JNDI Properties
6.6.3. Publishing Messages to a Topic
6.6.4. Reading Messages from the Queue
6.7. Writing Request/Response Applications in Java JMS
6.7.1. JNDI Properties
6.7.2. Running the Request/Response Examples
6.7.3. Client
6.7.4. The Server
6.8. Durability and Persistence in Java JMS
6.9. Using Transactions in Java JMS
6.10. Logging in Java clients
A. Revision History