activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1364749 - /activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
Date Mon, 23 Jul 2012 18:44:29 GMT
Author: chirino
Date: Mon Jul 23 18:44:28 2012
New Revision: 1364749

URL: http://svn.apache.org/viewvc?rev=1364749&view=rev
Log:
Fixes APLO-223 : Listener in Python Stomp example in Apollo doesn't wait for messages to be
published

Modified:
    activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py

Modified: activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py?rev=1364749&r1=1364748&r2=1364749&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
(original)
+++ activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
Mon Jul 23 18:44:28 2012
@@ -44,6 +44,7 @@ class MyListener(object):
       diff = time.time() - self.start
       print("Received %s in %f seconds" % (self.count, diff))
       conn.disconnect()
+      sys.exit(0)
       
     else:
       if self.count==0:
@@ -59,3 +60,5 @@ conn.start()
 conn.connect(login=user,passcode=password)
 conn.subscribe(destination=destination, ack='auto')
 print("Waiting for messages...")
+while 1: 
+  time.sleep(10) 



Mime
View raw message