mirror of https://github.com/apache/activemq.git
conn.start deprecated, id argument necessary by conn.subscribe
This commit is contained in:
parent
b01406b655
commit
924d0d1d2d
|
@ -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