Author: arnaudsimon
Date: Fri Jan 18 02:36:50 2008
New Revision: 613126
URL: http://svn.apache.org/viewvc?rev=613126&view=rev
Log:
Qpid-745
Modified:
incubator/qpid/trunk/qpid/python/examples/direct/declare_queues.py
incubator/qpid/trunk/qpid/python/examples/direct/listener.py
incubator/qpid/trunk/qpid/python/examples/fanout/declare_queues.py
incubator/qpid/trunk/qpid/python/examples/fanout/fanout_consumer.py
incubator/qpid/trunk/qpid/python/examples/fanout/fanout_producer.py
incubator/qpid/trunk/qpid/python/examples/fanout/listener.py
incubator/qpid/trunk/qpid/python/examples/pubsub/topic_subscriber.py
incubator/qpid/trunk/qpid/python/examples/request-response/client.py
incubator/qpid/trunk/qpid/python/examples/request-response/server.py
Modified: incubator/qpid/trunk/qpid/python/examples/direct/declare_queues.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/direct/declare_queues.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/direct/declare_queues.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/direct/declare_queues.py Fri Jan
18 02:36:50 2008
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
- config_direct_exchange.py
+ declare_queues.py
Creates and binds a queue on an AMQP direct exchange.
@@ -33,9 +33,6 @@
#----- Create a queue -------------------------------------
-# Create a queue named "listener" on channel 1, and bind it
-# to the "amq.direct" exchange.
-#
# queue_declare() creates an AMQP queue, which is held
# on the broker. Published messages are sent to the AMQP queue,
# from which messages are delivered to consumers.
@@ -50,4 +47,5 @@
#----- Cleanup ---------------------------------------------
session.session_close()
+
Modified: incubator/qpid/trunk/qpid/python/examples/direct/listener.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/direct/listener.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/direct/listener.py (original)
+++ incubator/qpid/trunk/qpid/python/examples/direct/listener.py Fri Jan 18
02:36:50 2008
@@ -64,9 +64,9 @@
consumer_tag = "consumer1"
queue = client.queue(consumer_tag)
-# Call message_consume() to tell the broker to deliver messages
+# Call message_subscribe() to tell the broker to deliver messages
# from the AMQP queue to this local client queue. The broker will
-# start delivering messages as soon as message_consume() is called.
+# start delivering messages as soon as message_subscribe() is called.
session.message_subscribe(queue="message_queue", destination=consumer_tag)
session.message_flow(consumer_tag, 0, 0xFFFFFFFF) # Kill these?
Modified: incubator/qpid/trunk/qpid/python/examples/fanout/declare_queues.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/fanout/declare_queues.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/fanout/declare_queues.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/fanout/declare_queues.py Fri Jan
18 02:36:50 2008
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
- config_direct_exchange.py
+ declare_queues.py
Creates and binds a queue on an AMQP direct exchange.
@@ -33,9 +33,6 @@
#----- Create a queue -------------------------------------
-# Create a queue named "listener" on channel 1, and bind it
-# to the "amq.fanout" exchange.
-#
# queue_declare() creates an AMQP queue, which is held
# on the broker. Published messages are sent to the AMQP queue,
# from which messages are delivered to consumers.
Modified: incubator/qpid/trunk/qpid/python/examples/fanout/fanout_consumer.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/fanout/fanout_consumer.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/fanout/fanout_consumer.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/fanout/fanout_consumer.py Fri Jan
18 02:36:50 2008
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
- direct_consumer.py
+ fanout_consumer.py
This AMQP client reads messages from a message
queue named "message_queue".
@@ -40,9 +40,9 @@
consumer_tag = "consumer1"
queue = client.queue(consumer_tag)
-# Call message_consume() to tell the broker to deliver messages
+# Call message_subscribe() to tell the broker to deliver messages
# from the AMQP queue to this local client queue. The broker will
-# start delivering messages as soon as message_consume() is called.
+# start delivering messages as soon as message_subscribe() is called.
session.message_subscribe(queue="message_queue", destination=consumer_tag)
session.message_flow(consumer_tag, 0, 0xFFFFFFFF)
Modified: incubator/qpid/trunk/qpid/python/examples/fanout/fanout_producer.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/fanout/fanout_producer.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/fanout/fanout_producer.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/fanout/fanout_producer.py Fri Jan
18 02:36:50 2008
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
- direct_producer.py
+ fanout_producer.py
Publishes messages to an AMQP direct exchange, using
the routing key "routing_key"
Modified: incubator/qpid/trunk/qpid/python/examples/fanout/listener.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/fanout/listener.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/fanout/listener.py (original)
+++ incubator/qpid/trunk/qpid/python/examples/fanout/listener.py Fri Jan 18
02:36:50 2008
@@ -1,6 +1,6 @@
#!/usr/bin/env python
"""
- direct_consumer.py
+ listener.py
This AMQP client reads messages from a message
queue named "message_queue".
@@ -63,9 +63,9 @@
consumer_tag = "consumer1"
queue = client.queue(consumer_tag)
-# Call message_consume() to tell the broker to deliver messages
+# Call message_subscribe() to tell the broker to deliver messages
# from the AMQP queue to this local client queue. The broker will
-# start delivering messages as soon as message_consume() is called.
+# start delivering messages as soon as message_subscribe() is called.
session.message_subscribe(queue="message_queue", destination=consumer_tag)
session.message_flow(consumer_tag, 0, 0xFFFFFFFF) # Kill these?
Modified: incubator/qpid/trunk/qpid/python/examples/pubsub/topic_subscriber.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/pubsub/topic_subscriber.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/pubsub/topic_subscriber.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/pubsub/topic_subscriber.py Fri
Jan 18 02:36:50 2008
@@ -22,9 +22,9 @@
consumer_tag = queue_name # Use the queue name as the consumer tag -
need a unique tag
queue = client.queue(consumer_tag)
- # Call basic_consume() to tell the broker to deliver messages
+ # Call message_subscribe() to tell the broker to deliver messages
# from the AMQP queue to a local client queue. The broker will
- # start delivering messages as soon as basic_consume() is called.
+ # start delivering messages as soon as message_subscribe() is called.
session.message_subscribe(queue=queue_name, destination=consumer_tag)
session.message_flow(consumer_tag, 0, 0xFFFFFFFF)
Modified: incubator/qpid/trunk/qpid/python/examples/request-response/client.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/request-response/client.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/request-response/client.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/request-response/client.py Fri
Jan 18 02:36:50 2008
@@ -24,7 +24,7 @@
# Call message_subscribe() to tell the broker to deliver messages
# from the AMQP queue to a local client queue. The broker will
- # start delivering messages as soon as basic_consume() is called.
+ # start delivering messages as soon as message_subscribe() is called.
session.message_subscribe(queue=queue_name, destination=consumer_tag)
session.message_flow(consumer_tag, 0, 0xFFFFFFFF)
Modified: incubator/qpid/trunk/qpid/python/examples/request-response/server.py
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/examples/request-response/server.py?rev=613126&r1=613125&r2=613126&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/examples/request-response/server.py
(original)
+++ incubator/qpid/trunk/qpid/python/examples/request-response/server.py Fri
Jan 18 02:36:50 2008
@@ -38,7 +38,7 @@
client = Client(host, port, qpid.spec.load(amqp_spec))
client.start({"LOGIN": user, "PASSWORD": password})
-# Open Channel 1 so we can use it to manage our queue.
+# Create a session and open it.
session = client.session()
session.session_open()