{"action":"opened","issue":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-ruby/issues/448","repository_url":"https://api.github.com/repos/Azure/azure-sdk-for-ruby","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-ruby/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-ruby/issues/448/comments","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-ruby/issues/448/events","html_url":"https://github.com/Azure/azure-sdk-for-ruby/issues/448","id":174858803,"number":448,"title":"ASB Queue receive_queue_message takes really long","user":{"login":"mydiemho","id":1634185,"avatar_url":"https://avatars.githubusercontent.com/u/1634185?v=3","gravatar_id":"","url":"https://api.github.com/users/mydiemho","html_url":"https://github.com/mydiemho","followers_url":"https://api.github.com/users/mydiemho/followers","following_url":"https://api.github.com/users/mydiemho/following{/other_user}","gists_url":"https://api.github.com/users/mydiemho/gists{/gist_id}","starred_url":"https://api.github.com/users/mydiemho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mydiemho/subscriptions","organizations_url":"https://api.github.com/users/mydiemho/orgs","repos_url":"https://api.github.com/users/mydiemho/repos","events_url":"https://api.github.com/users/mydiemho/events{/privacy}","received_events_url":"https://api.github.com/users/mydiemho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T22:24:40Z","updated_at":"2016-09-02T22:24:40Z","closed_at":null,"body":"Dequeueing takes a long time and occasionally time out.  A few [data points](https://gist.github.com/mydiemho/dec08cb003120afeec7edb2f310dc0e0).\r\n\r\n```ruby\r\n    def dequeue()\r\n\r\n      start_time = Time.now\r\n\r\n      begin\r\n        queue_depth = queue_depth()\r\n        puts \"#{queue_depth} messages in queue\"\r\n\r\n        if queue_depth > 0\r\n          puts 'Dequeue'\r\n\r\n          @start_time = Time.now\r\n          message = @service_bus.receive_queue_message(@queue_name, { :peek_lock => false})\r\n\r\n          puts message.body\r\n        else\r\n          puts 'Queue is empty'\r\n        end\r\n      rescue => ex\r\n        #\r\n        # puts ex.backtrace\r\n        # puts ex.message\r\n      ensure\r\n        end_time = Time.now\r\n        puts \"duration: #{end_time.to_f - start_time.to_f}\"\r\n      end\r\n    end\r\n```"}}
{"actor":{"display_login":"mydiemho"}}