{"action":"created","issue":{"url":"https://api.github.com/repos/jondot/sneakers/issues/105","labels_url":"https://api.github.com/repos/jondot/sneakers/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/jondot/sneakers/issues/105/comments","events_url":"https://api.github.com/repos/jondot/sneakers/issues/105/events","html_url":"https://github.com/jondot/sneakers/issues/105","id":62538664,"number":105,"title":"Use sneakers with default exchange","user":{"login":"abezzub","id":3282823,"avatar_url":"https://avatars.githubusercontent.com/u/3282823?v=3","gravatar_id":"","url":"https://api.github.com/users/abezzub","html_url":"https://github.com/abezzub","followers_url":"https://api.github.com/users/abezzub/followers","following_url":"https://api.github.com/users/abezzub/following{/other_user}","gists_url":"https://api.github.com/users/abezzub/gists{/gist_id}","starred_url":"https://api.github.com/users/abezzub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abezzub/subscriptions","organizations_url":"https://api.github.com/users/abezzub/orgs","repos_url":"https://api.github.com/users/abezzub/repos","events_url":"https://api.github.com/users/abezzub/events{/privacy}","received_events_url":"https://api.github.com/users/abezzub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T23:02:46Z","updated_at":"2015-03-17T23:08:04Z","closed_at":null,"body":"Is Sneakers supposed to work with default exchange? If I setup Sneakers like this:\r\n```\r\nSneakers.configure(amqp: ENV[\"CLOUDAMQP_URL\"],\r\n                   vhost: ENV[\"CLOUDAMQP_VHOST\"],\r\n# other settings...\r\n                   exchange: \"\")\r\n```\r\nI get this error (partial stack trace):\r\n```\r\nUnexpected error ACCESS_REFUSED - operation not permitted on the default exchange\r\n  /.rvm/gems/ruby-2.2.1/gems/bunny-1.7.0/lib/bunny/channel.rb:1915:in `raise_if_continuation_resulted_in_a_channel_error!'\r\n/.rvm/gems/ruby-2.2.1/gems/bunny-1.7.0/lib/bunny/channel.rb:1073:in `queue_bind'\r\n/.rvm/gems/ruby-2.2.1/gems/bunny-1.7.0/lib/bunny/queue.rb:103:in `bind'\r\n/.rvm/gems/ruby-2.2.1/gems/sneakers-1.0.2/lib/sneakers/queue.rb:39:in `block in subscribe'\r\n/.rvm/gems/ruby-2.2.1/gems/sneakers-1.0.2/lib/sneakers/queue.rb:38:in `each'\r\n/.rvm/gems/ruby-2.2.1/gems/sneakers-1.0.2/lib/sneakers/queue.rb:38:in `subscribe'\r\n/.rvm/gems/ruby-2.2.1/gems/sneakers-1.0.2/lib/sneakers/worker.rb:102:in `run'\r\n```\r\nError happens here (in queue.rb):\r\n```\r\n    routing_keys.each do |key|\r\n      queue.bind(@exchange, :routing_key => key) # error!\r\n    end\r\n```\r\n\r\nIf I understand correctly all queues are binded to default exchange by default, so bind can be skipped if `@exchange` is a default exchange. If it is OK to support default exchange I will be happy to submit a PR. I assume something like this should do the trick:\r\n```\r\n    if @opts[:exchange].length > 0\r\n      routing_keys.each do |key|\r\n        queue.bind(@exchange, :routing_key => key)\r\n      end\r\n    end\r\n```\r\nI tested above with my app and it works. Let me know what you think."},"comment":{"url":"https://api.github.com/repos/jondot/sneakers/issues/comments/82634827","html_url":"https://github.com/jondot/sneakers/issues/105#issuecomment-82634827","issue_url":"https://api.github.com/repos/jondot/sneakers/issues/105","id":82634827,"user":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T23:08:04Z","updated_at":"2015-03-17T23:08:04Z","body":"Default exchange has implicit bindings and is not supposed to be bound explicitly. Sneakers does not take this into account."}}