Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic_get on non existing queue does not throw NotFound, rather times out #518

Closed
carlhoerberg opened this issue Sep 23, 2017 · 0 comments
Closed
Labels
bug

Comments

@carlhoerberg
Copy link
Contributor

@carlhoerberg carlhoerberg commented Sep 23, 2017

This code:

require 'bunny'
b = Bunny.new("amqp://guest:guest@localhost")
b.start
ch = b.create_channel
puts ch.basic_get "asdfasdfasdfasdfadfs"

Will generate:

/Users/carl/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bunny-2.7.0/lib/bunny/concurrent/continuation_queue.rb:39:in `block in poll': Timeout::Error (Timeout::Error)
from /Users/carl/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bunny-2.7.0/lib/bunny/concurrent/continuation_queue.rb:30:in `synchronize'
from /Users/carl/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bunny-2.7.0/lib/bunny/concurrent/continuation_queue.rb:30:in `poll'
from /Users/carl/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bunny-2.7.0/lib/bunny/channel.rb:1779:in `wait_on_basic_get_continuations'
from /Users/carl/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bunny-2.7.0/lib/bunny/channel.rb:605:in `basic_get'
from test/ruby.rb:6:in `<main>'

Rather than an expected NotFound error.

@michaelklishin michaelklishin added the bug label Sep 23, 2017
michaelklishin added a commit that referenced this issue Sep 23, 2017
Closes #518
Bunny::Channel#basic_get uses a separate conitnuation data structure, so
if a timeout hits any pending channel-level exceptions won't be thrown
without some extra effort.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.