문제

I'm tring to use stomp.py for consume messages from ativemq. Now when I try set-up it gives me:

TypeErrorTypeError: subscribe() takes at least 3 arguments (3 given)

This my code is :

conn = stomp.Connection()
conn.start()
conn.connect()
conn.subscribe(destination=config['queue_name'], ack='auto')

Anyone knows how to solve this?

도움이 되었습니까?

해결책

You need to pass in a dictionary with configuration values, making that one argument:

conn.subscribe({destination=config['queue_name'], ack='auto'})

See the Stomp.subscribe() documentation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top