mirror of https://github.com/apache/activemq.git
Merge pull request #528 from mparada/update-stomp-py-example
conn.start deprecated, id argument necessary by conn.subscribe
This commit is contained in:
commit
0bdaf88780
|
@ -56,9 +56,8 @@ class MyListener(object):
|
|||
|
||||
conn = stomp.Connection(host_and_ports = [(host, port)])
|
||||
conn.set_listener('', MyListener(conn))
|
||||
conn.start()
|
||||
conn.connect(login=user,passcode=password)
|
||||
conn.subscribe(destination=destination, ack='auto')
|
||||
conn.subscribe(destination=destination, id=1, ack='auto')
|
||||
print("Waiting for messages...")
|
||||
while 1:
|
||||
time.sleep(10)
|
||||
|
|
Loading…
Reference in New Issue