Programming in Apache Qpid

Programming in Apache Qpid

Programming in Apache Qpid Cross-Platform AMQP Messaging in Java JMS, .NET, C++, and Python Programming in Apache Qpid: Cross-Platform AMQP Messaging in Java JMS, .NET, C++, and Python Table of Contents 1. Introduction ................................................................................................................... 1 2. Using the Qpid Messaging API ......................................................................................... 2 2.1. A Simple Messaging Program in C++ ...................................................................... 2 2.2. A Simple Messaging Program in Python ................................................................... 4 2.3. Addresses ............................................................................................................ 4 2.3.1. Address Strings ......................................................................................... 6 2.3.2. Subjects ................................................................................................... 7 2.3.3. Address String Options ............................................................................. 10 2.3.4. Address String Grammar ........................................................................... 16 2.4. Logging ............................................................................................................ 17 2.4.1. Logging in C++ ....................................................................................... 17 2.4.2. Logging in Python .................................................................................... 17 2.5. Receiving Messages from Multiple Sources ............................................................. 18 2.6. Request / Response ............................................................................................. 18 2.7. Maps in Message Content .................................................................................... 19 2.7.1. Qpid Maps in Python ................................................................................ 20 2.7.2. Qpid Maps in C++ ................................................................................... 20 2.8. Performance ....................................................................................................... 22 2.8.1. Batching Acknowledgements ...................................................................... 22 2.8.2. Prefetch .................................................................................................. 22 2.8.3. Sizing the Replay Buffer ........................................................................... 23 2.9. Reliability .......................................................................................................... 23 2.9.1. Reconnect ............................................................................................... 23 2.9.2. Guaranteed Delivery ................................................................................. 24 2.9.3. Reliability Options in Senders and Receivers ................................................. 25 2.9.4. Cluster Failover ....................................................................................... 25 2.10. Security ........................................................................................................... 25 2.11. Transactions ..................................................................................................... 26 2.12. The AMQP 0-10 mapping .................................................................................. 27 3. Using the Qpid JMS client .............................................................................................. 29 3.1. A Simple Messaging Program in Java JMS ............................................................. 29 3.2. Apache Qpid JNDI Properties for AMQP Messaging ................................................. 31 3.2.1. JNDI Properties for Apache Qpid ................................................................ 31 3.2.2. Connection URLs ..................................................................................... 32 3.3. Java JMS Message Properties ............................................................................... 34 3.4. JMS MapMessage Types ...................................................................................... 35 4. Using the Qpid WCF client ............................................................................................ 38 4.1. XML and Binary Bindings ................................................................................... 38 4.2. Endpoints .......................................................................................................... 42 4.3. Message Headers ................................................................................................ 42 4.4. Security ............................................................................................................ 43 4.5. Transactions ....................................................................................................... 43 iii List of Tables 2.1. Address String Options ................................................................................................ 14 2.2. Node Properties .......................................................................................................... 14 2.3. Link Properties ........................................................................................................... 15 2.4. Python Datatypes in Maps ............................................................................................ 20 2.5. C++ Datatypes in Maps ............................................................................................... 22 2.6. Connection Options ..................................................................................................... 24 2.7. SSL Client Environment Variables for C++ clients ........................................................... 26 2.8. Mapping to AMQP 0-10 Message Properties ................................................................... 28 3.1. JNDI Properties supported by Apache Qpid ..................................................................... 31 3.2. Connection URL Properties .......................................................................................... 32 3.3. Broker List Options .................................................................................................... 33 3.4. Java JMS Mapping to AMQP 0-10 Message Properties ...................................................... 34 3.5. Java Datatypes in Maps ............................................................................................... 37 4.1. WCF Binding Parameters ............................................................................................. 41 iv List of Examples 2.1. "Hello world!" in C++ .................................................................................................. 3 2.2. "Hello world!" in Python ............................................................................................... 4 2.3. Queues ....................................................................................................................... 5 2.4. Topics ........................................................................................................................ 6 2.5. Using subjects ............................................................................................................. 8 2.6. Subjects with multi-word keys ........................................................................................ 9 2.7. Assertions on Nodes .................................................................................................... 11 2.8. Creating a Queue Automatically .................................................................................... 11 2.9. Browsing a Queue ...................................................................................................... 12 2.10. Using the XML Exchange .......................................................................................... 13 2.11. Receiving Messages from Multiple Sources ................................................................... 18 2.12. Request / Response Applications in C++ ....................................................................... 19 2.13. Sending Qpid Maps in Python ..................................................................................... 20 2.14. Sending Qpid Maps in C++ ........................................................................................ 21 2.15. Prefetch ................................................................................................................... 22 2.16. Sizing the Replay Buffer ............................................................................................ 23 2.17. Specifying Connection Options in C++ and Python ......................................................... 23 2.18. Guaranteed Delivery .................................................................................................. 24 2.19. Cluster Failover in C++ ............................................................................................. 25 2.20. Transactions ............................................................................................................. 27 3.1. JNDI Properties File for "Hello world!" example .............................................................. 29 3.2. "Hello world!" in Java ................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    49 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us