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.

Memory channel doesn't clear queues on close

See original GitHub issue

https://github.com/celery/kombu/blob/cbd327dc3bdd124c1bc4fc3d8f2b451fd10e2da6/kombu/transport/memory.py#L59

queue.empty() doesn’t empty the queue - it returns a boolean stating whether the queue is empty. In order to clear a queue (without touching the internals), one has to pop from it until it’s empty.

It remains a question if clearing should take place at all and whether the queues should be channel-scoped or transport-scoped. There’s definitely a need to be able to clear the queues between tests.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
karolinepaulscommented, Feb 4, 2020

@auvipy There is no fix because I don’t know what the expected behaviour is.

It remains a question if clearing should take place at all and whether the queues should be channel-scoped or transport-scoped. There’s definitely a need to be able to clear the queues between tests.

It is crucial to decide on the behaviour wanted before commencing implementation.

0reactions
thedrowcommented, Mar 25, 2021

If you purge the queue using RabbitMQ, it is purged for all channels, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do my RabbitMQ channels keep closing? - Stack Overflow
Another possible reason for Receiving a Channel Closed Exception is when Publishers and Consumers are accessing Channel/Queue with different ...
Read more >
Memory leak when closing channels #264 - streadway/amqp
When the "in" channel is closed, it stops consuming from it by setting the channel to nil, but then attempts to drain the...
Read more >
RabbitMQ Clear Queues: How to Delete Queues & Purge ...
This function deletes queues that haven't been used for 28 days. An auto-delete queue takes place when the last consumer cancels or the ......
Read more >
13 Common RabbitMQ Mistakes and How to Avoid Them
Don't open and close connections or channels repeatedly. · Don't use too many connections or channels. · Don't share channels between threads.
Read more >
How to Gracefully Close Channels - Go 101
In other words, we should only close a channel in a sender goroutine if the ... closed and the value buffer queue //...
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