conn.start deprecated, id argument necessary by conn.subscribe

This commit is contained in:
Marcelo Parada 2020-05-07 15:45:56 +02:00 committed by GitHub
parent b01406b655
commit 924d0d1d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -56,9 +56,8 @@ class MyListener(object):
conn = stomp.Connection(host_and_ports = [(host, port)]) conn = stomp.Connection(host_and_ports = [(host, port)])
conn.set_listener('', MyListener(conn)) conn.set_listener('', MyListener(conn))
conn.start()
conn.connect(login=user,passcode=password) conn.connect(login=user,passcode=password)
conn.subscribe(destination=destination, ack='auto') conn.subscribe(destination=destination, id=1, ack='auto')
print("Waiting for messages...") print("Waiting for messages...")
while 1: while 1:
time.sleep(10) time.sleep(10)