Incompatibility with pika 1.0.0 beta
When amqpfind runs with an interpreter that already has a pika install, it prefers that to its own bundled versions (0.12 for py2 and 0.13 for py3). In the case of pika 1.0.0 betas currently available, amqpfind fails.
$ amqpfind/amqpfind -d -H mq1.ssec.wisc.edu -u sdsuser -p sdsmq -X satellite -j '{start_time} {quality_score}' -C 'geo.goes.g16.abi.*.realtime.*.band.end'
Traceback (most recent call last):
File "/Users/keoni/opt/amqpfind/amqpfind.py", line 772, in <module>
sys.exit(main())
File "/Users/keoni/opt/amqpfind/amqpfind.py", line 766, in main
return single_main(servers[0], opts, args, extra_eval_namespace)
File "/Users/keoni/opt/amqpfind/amqpfind.py", line 629, in single_main
session.consume(callback, timeout=opts.timeout)
File "/Users/keoni/opt/amqpfind/amqpfind.py", line 227, in consume
result = self.channel.queue_declare(exclusive=True, auto_delete=True)
TypeError: queue_declare() missing 1 required positional argument: 'queue'
> /Users/keoni/opt/amqpfind/amqpfind.py(227)consume()
-> result = self.channel.queue_declare(exclusive=True, auto_delete=True)
(Pdb) q
This can be worked around by making sure that the default interpreter doesn't already have pika installed, i.e. python -c 'import pika; print(pika.__version__)'
fails with an ImportError.
Expected tasks:
-
amqpfind should determine whether an incompatible pika is present in the environment -
auto-adapt to pika 1.0 API while retaining compatibility with 0.12 (py2) and 0.13 (py3) API
Edited by Ray Garcia