{"action":"created","issue":{"url":"https://api.github.com/repos/timgit/pg-boss/issues/4","repository_url":"https://api.github.com/repos/timgit/pg-boss","labels_url":"https://api.github.com/repos/timgit/pg-boss/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/timgit/pg-boss/issues/4/comments","events_url":"https://api.github.com/repos/timgit/pg-boss/issues/4/events","html_url":"https://github.com/timgit/pg-boss/issues/4","id":167208907,"number":4,"title":"Throttling the publisher is problematic","user":{"login":"jtlapp","id":138133,"avatar_url":"https://avatars.githubusercontent.com/u/138133?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlapp","html_url":"https://github.com/jtlapp","followers_url":"https://api.github.com/users/jtlapp/followers","following_url":"https://api.github.com/users/jtlapp/following{/other_user}","gists_url":"https://api.github.com/users/jtlapp/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlapp/subscriptions","organizations_url":"https://api.github.com/users/jtlapp/orgs","repos_url":"https://api.github.com/users/jtlapp/repos","events_url":"https://api.github.com/users/jtlapp/events{/privacy}","received_events_url":"https://api.github.com/users/jtlapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-07-23T23:34:34Z","updated_at":"2016-07-26T22:47:05Z","closed_at":null,"body":"According to the documentation, the only throttling available is via a throttle period set upon publishing an event. The throttle only allows the publisher to post one task per throttle period, refusing to post the job to the queue otherwise. I'm seeing two problems with this approach:\r\n\r\n(1) If the server needs to throttle, it's likely because the server is _currently_ having trouble. It needs to throttle already-queued jobs in order to recover.\r\n\r\n(2) Suppose I have an HTTP server queuing tasks in response to client requests. The server can't block the client request until the queue stops throttling. Instead, it has to queue the job and allow the next request to arrive. If the server is busy, the client will just have to wait longer for the job to be done. The client shouldn't be told, \"Sorry the server is too busy to even register your request.\" So the job gets queued. The workaround would be to create a job-pending queue that feeds the actual job queue; the job's gotta go into a queue."},"comment":{"url":"https://api.github.com/repos/timgit/pg-boss/issues/comments/235429479","html_url":"https://github.com/timgit/pg-boss/issues/4#issuecomment-235429479","issue_url":"https://api.github.com/repos/timgit/pg-boss/issues/4","id":235429479,"user":{"login":"jtlapp","id":138133,"avatar_url":"https://avatars.githubusercontent.com/u/138133?v=3","gravatar_id":"","url":"https://api.github.com/users/jtlapp","html_url":"https://github.com/jtlapp","followers_url":"https://api.github.com/users/jtlapp/followers","following_url":"https://api.github.com/users/jtlapp/following{/other_user}","gists_url":"https://api.github.com/users/jtlapp/gists{/gist_id}","starred_url":"https://api.github.com/users/jtlapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtlapp/subscriptions","organizations_url":"https://api.github.com/users/jtlapp/orgs","repos_url":"https://api.github.com/users/jtlapp/repos","events_url":"https://api.github.com/users/jtlapp/events{/privacy}","received_events_url":"https://api.github.com/users/jtlapp/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T22:47:05Z","updated_at":"2016-07-26T22:47:05Z","body":"Yeah, that's what I assumed. I'm finding your words taking me all over the map. I fear there is no choice at this point but for me to study the code to figure out how to use the API. Thanks for your continued effort to break through though!"}}
{"actor":{"display_login":"jtlapp"}}