{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/1359","repository_url":"https://api.github.com/repos/Netflix/Hystrix","labels_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1359/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1359/comments","events_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1359/events","html_url":"https://github.com/Netflix/Hystrix/issues/1359","id":178518448,"number":1359,"title":"Usage of hystrix","user":{"login":"mohamedanees","id":16822870,"avatar_url":"https://avatars.githubusercontent.com/u/16822870?v=3","gravatar_id":"","url":"https://api.github.com/users/mohamedanees","html_url":"https://github.com/mohamedanees","followers_url":"https://api.github.com/users/mohamedanees/followers","following_url":"https://api.github.com/users/mohamedanees/following{/other_user}","gists_url":"https://api.github.com/users/mohamedanees/gists{/gist_id}","starred_url":"https://api.github.com/users/mohamedanees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohamedanees/subscriptions","organizations_url":"https://api.github.com/users/mohamedanees/orgs","repos_url":"https://api.github.com/users/mohamedanees/repos","events_url":"https://api.github.com/users/mohamedanees/events{/privacy}","received_events_url":"https://api.github.com/users/mohamedanees/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Netflix/Hystrix/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-22T04:17:09Z","updated_at":"2016-09-23T00:37:39Z","closed_at":null,"body":"@mattrjacobs \r\nI am new to Hystrix and would like to know the possibility of configuring hystrix in such a way to suit my scneario. If yes,Kindly advise\r\n\r\nStarting many threads at point A which individually has many API calls.(Using Future)\r\n\r\nWhile any Thread X is executing,I have used Hystrix for short-circuiting an API call (say create session with a specific CommandKey and Login with another CommandKey etc. but all API calls inside a particular thread is in same CommandGroup)\r\n\r\nNow when a particular API call is failing (say,create session call alone. Login and other API calls are working just fine),Is it possible to short circuit the creation of thread itself at point A by implementing Hystrix there?\r\n"},"comment":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/comments/249068895","html_url":"https://github.com/Netflix/Hystrix/issues/1359#issuecomment-249068895","issue_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1359","id":249068895,"user":{"login":"mattrjacobs","id":205579,"avatar_url":"https://avatars.githubusercontent.com/u/205579?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrjacobs","html_url":"https://github.com/mattrjacobs","followers_url":"https://api.github.com/users/mattrjacobs/followers","following_url":"https://api.github.com/users/mattrjacobs/following{/other_user}","gists_url":"https://api.github.com/users/mattrjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrjacobs/subscriptions","organizations_url":"https://api.github.com/users/mattrjacobs/orgs","repos_url":"https://api.github.com/users/mattrjacobs/repos","events_url":"https://api.github.com/users/mattrjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/mattrjacobs/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T00:37:39Z","updated_at":"2016-09-23T00:37:39Z","body":"Let me restate your question to make sure I understand...\r\n\r\nYou're creating application threads and on each of them, doing I/O work like CreateSession/Login that hits another service.  Your question is if you can prevent the creation of the thread in the first place.\r\n\r\nLet me know if I got that right.\r\n\r\nIf I did, then I would suggest that you let Hystrix manage the threads for you.  If you do that, then a short-circuit never runs on a Hystrix thread.  As a concrete example, we often write code in which application threads (like a Tomcat thread) calls command.queue() or command.observe() to get back a nonblocking handle on the work done by the command.  If the command gets latent, the Tomcat thread is protected.  If the command short-circuits, then the I/O work never gets run, and the Hystrix thread does not get involved.\r\n\r\nHope that helps!"}}
{"actor":{"display_login":"mattrjacobs"}}