question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BlockingChannel.queue_declare hanging on non-string queue parameters

See original GitHub issue

Under Python 3.6.4 and Pika 0.11.2, the BlockingChannel.queue_declare method hangs when setting its queue parameter to a value that is not of str type (e.g., int, bool, list, dict, tuple, NoneType).

Input:

$ python3 <<EOF
import pika
with pika.BlockingConnection() as connection:
    channel = connection.channel()
    channel.queue_declare(queue=[1, 2, 3])
EOF

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
vitaly-kruglcommented, Mar 13, 2018

@lukebakken: Okay, so this now makes sense - the finally: block in the original BlockingConnection example and pika.BlockingConnection() as context manager in this new example will deadlock (trying to auto-close the channel) on the erroneously blocked channel that resulted from the assertion error and prevent the exception from bubbling up.

0reactions
vitaly-kruglcommented, Mar 13, 2018

And although the asynchronous connection example doesn’t hang since it simply doesn’t do anything that interferes with the processing of that exception, the channel state would still be messed up - in particular, I expectself._blocking to remain set and the redundant callbacks to continue to be registered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BlockingConnection — pika 1.2.1 documentation
To prevent recursion/reentrancy, the blocking connection and channel implementations queue asynchronously-delivered events received in nested context (e.g., ...
Read more >
Blocking connection hanging on basic_consume when using ...
I've created a little library to bind some processing function to a rabbitMQ queue and then perform that processing once something is placed ......
Read more >
RabbitMQ tutorial - Work Queues
In this one we'll create a Work Queue that will be used to distribute ... Change the class name and add command line...
Read more >
rabbitmq client hangs while trying to declare queue
Declaration of queues is currently in my postconstruct of beans. I can't speak to the hang but you should NEVER interact with the...
Read more >
Channel (RabbitMQ Java Client 4.12.0 API)
Map) but sets nowait parameter to true and returns void (as there will be no response from the server). AMQP.Queue.DeclareOk, queueDeclare(). Actively declare...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found