summaryrefslogtreecommitdiff
path: root/qpid/python/examples/README
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2009-12-08 15:56:20 +0000
committerTed Ross <tross@apache.org>2009-12-08 15:56:20 +0000
commitfb61c034f8dd85ed3317b6fa6b701947502a7cfb (patch)
tree5ceff5d8872c8eab8f279d4d1c76c07df27225e9 /qpid/python/examples/README
parent90dbe89d34d8e29086ffff20223994dbc53d9ffd (diff)
downloadqpid-python-fb61c034f8dd85ed3317b6fa6b701947502a7cfb.tar.gz
QPID-2249 Python Headers Exchange Example
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@888452 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/examples/README')
-rw-r--r--qpid/python/examples/README52
1 files changed, 52 insertions, 0 deletions
diff --git a/qpid/python/examples/README b/qpid/python/examples/README
index 24d449afc2..bd30b2a6f4 100644
--- a/qpid/python/examples/README
+++ b/qpid/python/examples/README
@@ -265,3 +265,55 @@ You should see the following output:
<wind_speed_mph>16</wind_speed_mph><temperature_f>70</temperature_f>
<dewpoint>35</dewpoint></weather>
+
+Running the Headers Examples
+-----------------------------
+
+To run the headers examples, do the following:
+
+1. Make sure that a qpidd broker is running:
+
+ $ ps -eaf | grep qpidd
+
+ If a broker is running, you should see the qpidd process in the output of the above command.
+
+2.Declare a message queues and bind them to an exchange by running declare_queues.py, as follows:
+
+ $ python declare_queues.py
+
+ This program has no output. After this program has been run, all messages sent to the amq.match exchange with an application-header of {'class': 'first'} will be routed to the queue named "first" and messages with an application-header of {'class': 'second'} will be routed to the queue named "second".
+
+3.Publish a series of messages to the amq.match exchange by running headers_producer.py, as follows:
+
+ $ python headers_producer.py
+
+This program has no output; the messages are routed to the message queues, as instructed by the bindings.
+
+4. Read the messages from the message queues using headers_consumer.py as follows:
+
+ $ python headers_consumer.py
+
+You should see the following output:
+
+message(first) 0
+message(first) 1
+message(first) 2
+message(first) 3
+message(first) 4
+message(first) 5
+message(first) 6
+message(first) 7
+message(first) 8
+message(first) 9
+That's all, folks!
+message(second) 0
+message(second) 1
+message(second) 2
+message(second) 3
+message(second) 4
+message(second) 5
+message(second) 6
+message(second) 7
+message(second) 8
+message(second) 9
+That's all, folks!