{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/1105","repository_url":"https://api.github.com/repos/Netflix/Hystrix","labels_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1105/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1105/comments","events_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1105/events","html_url":"https://github.com/Netflix/Hystrix/pull/1105","id":136546019,"number":1105,"title":"Allow Hystrix  to be used as lambda","user":{"login":"velo","id":136590,"avatar_url":"https://avatars.githubusercontent.com/u/136590?v=3","gravatar_id":"","url":"https://api.github.com/users/velo","html_url":"https://github.com/velo","followers_url":"https://api.github.com/users/velo/followers","following_url":"https://api.github.com/users/velo/following{/other_user}","gists_url":"https://api.github.com/users/velo/gists{/gist_id}","starred_url":"https://api.github.com/users/velo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/velo/subscriptions","organizations_url":"https://api.github.com/users/velo/orgs","repos_url":"https://api.github.com/users/velo/repos","events_url":"https://api.github.com/users/velo/events{/privacy}","received_events_url":"https://api.github.com/users/velo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-25T23:33:37Z","updated_at":"2016-02-29T13:58:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Netflix/Hystrix/pulls/1105","html_url":"https://github.com/Netflix/Hystrix/pull/1105","diff_url":"https://github.com/Netflix/Hystrix/pull/1105.diff","patch_url":"https://github.com/Netflix/Hystrix/pull/1105.patch"},"body":"The end game here is to be able to use Hystrix with java 8 lambdas\r\n```\r\n    try (HystrixRequestContext context = HystrixRequestContext.initializeContext();)\r\n    {\r\n      int result = execute(asKey(\"unittest\"), () -> number * 10);\r\n      Assert.assertEquals(70, result);\r\n    }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/comments/190222535","html_url":"https://github.com/Netflix/Hystrix/pull/1105#issuecomment-190222535","issue_url":"https://api.github.com/repos/Netflix/Hystrix/issues/1105","id":190222535,"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-02-29T13:58:05Z","updated_at":"2016-02-29T13:58:05Z","body":"My initial thought is that this is a fine thing to do, but belongs outside of `hystrix-core`.  This change essentially separates out `HystrixCommand` into 3 pieces: GroupKey, execution behavior, and fallback behavior.  \r\n\r\nThere's much more that's possible to configure on a `HystrixCommand`, and I think matching the config capabilities of a direct `HystrixCommand` object takes away from the readability gains of the lambda-syntax.  \r\n\r\n`hystrix-core` also has functionality which you haven't modeled yet: `HystrixObservableCommand`, and the `queue()`,`observe()`, `toObservable()` method of executing commands.  It's completely fine to not model those pieces of functionality if your use case doesn't require them, but then this code should be outside of `hystrix-core`.\r\n\r\nWould anyone else in the community use this feature if added?"}}