diff options
Diffstat (limited to 'qpid/python/examples/fanout')
-rwxr-xr-x | qpid/python/examples/fanout/fanout_consumer.py | 5 | ||||
-rwxr-xr-x | qpid/python/examples/fanout/listener.py | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/qpid/python/examples/fanout/fanout_consumer.py b/qpid/python/examples/fanout/fanout_consumer.py index 4a0e8ef488..a2b1b30141 100755 --- a/qpid/python/examples/fanout/fanout_consumer.py +++ b/qpid/python/examples/fanout/fanout_consumer.py @@ -51,12 +51,11 @@ session.exchange_bind(queue=server_queue_name, exchange="amq.fanout") local_queue_name = "local_queue" local_queue = session.incoming(local_queue_name) -# Call message_consume() to tell the server to deliver messages +# Call message_subscribe() to tell the server to deliver messages # from the AMQP queue to this local client queue. session.message_subscribe(queue=server_queue_name, destination=local_queue_name) -session.message_flow(local_queue_name, session.credit_unit.message, 0xFFFFFFFF) -session.message_flow(local_queue_name, session.credit_unit.byte, 0xFFFFFFFF) +local_queue.start() print "Subscribed to queue " + server_queue_name sys.stdout.flush() diff --git a/qpid/python/examples/fanout/listener.py b/qpid/python/examples/fanout/listener.py index b2ed85045b..74ae858127 100755 --- a/qpid/python/examples/fanout/listener.py +++ b/qpid/python/examples/fanout/listener.py @@ -79,11 +79,10 @@ local_queue = session.incoming(local_queue_name) # 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_subscribe() is called. +# start delivering messages as soon as local_queue.start() is called. session.message_subscribe(queue=server_queue_name, destination=local_queue_name) -session.message_flow(local_queue_name, session.credit_unit.message, 0xFFFFFFFF) -session.message_flow(local_queue_name, session.credit_unit.byte, 0xFFFFFFFF) +local_queue.start() receiver = Receiver () local_queue.listen (receiver.Handler) |