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