{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/comments/55029758","id":55029758,"diff_hunk":"@@ -2,12 +2,14 @@\n \n module Kafka\n   class BrokerPool\n-    def initialize(client_id:, connect_timeout: nil, socket_timeout: nil, logger:)\n+    def initialize(client_id:, connect_timeout: nil, socket_timeout: nil, logger:, ssl: nil, ssl_context: nil)","path":"lib/kafka/broker_pool.rb","position":5,"original_position":5,"commit_id":"dbd3964824c8867f7304a22c980bec0b5c533b9d","original_commit_id":"dbd3964824c8867f7304a22c980bec0b5c533b9d","user":{"login":"dasch","id":6351,"avatar_url":"https://avatars.githubusercontent.com/u/6351?v=3","gravatar_id":"","url":"https://api.github.com/users/dasch","html_url":"https://github.com/dasch","followers_url":"https://api.github.com/users/dasch/followers","following_url":"https://api.github.com/users/dasch/following{/other_user}","gists_url":"https://api.github.com/users/dasch/gists{/gist_id}","starred_url":"https://api.github.com/users/dasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasch/subscriptions","organizations_url":"https://api.github.com/users/dasch/orgs","repos_url":"https://api.github.com/users/dasch/repos","events_url":"https://api.github.com/users/dasch/events{/privacy}","received_events_url":"https://api.github.com/users/dasch/received_events","type":"User","site_admin":false},"body":"I'm not sure about this API – why not just have e.g. `ssl_context` and disable SSL if it's nil?","created_at":"2016-03-04T13:34:53Z","updated_at":"2016-03-04T13:34:53Z","html_url":"https://github.com/zendesk/ruby-kafka/pull/116#discussion_r55029758","pull_request_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116","_links":{"self":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/comments/55029758"},"html":{"href":"https://github.com/zendesk/ruby-kafka/pull/116#discussion_r55029758"},"pull_request":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116","id":61711346,"html_url":"https://github.com/zendesk/ruby-kafka/pull/116","diff_url":"https://github.com/zendesk/ruby-kafka/pull/116.diff","patch_url":"https://github.com/zendesk/ruby-kafka/pull/116.patch","issue_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/116","number":116,"state":"open","locked":false,"title":"SSL connection support","user":{"login":"tcrayford","id":55975,"avatar_url":"https://avatars.githubusercontent.com/u/55975?v=3","gravatar_id":"","url":"https://api.github.com/users/tcrayford","html_url":"https://github.com/tcrayford","followers_url":"https://api.github.com/users/tcrayford/followers","following_url":"https://api.github.com/users/tcrayford/following{/other_user}","gists_url":"https://api.github.com/users/tcrayford/gists{/gist_id}","starred_url":"https://api.github.com/users/tcrayford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcrayford/subscriptions","organizations_url":"https://api.github.com/users/tcrayford/orgs","repos_url":"https://api.github.com/users/tcrayford/repos","events_url":"https://api.github.com/users/tcrayford/events{/privacy}","received_events_url":"https://api.github.com/users/tcrayford/received_events","type":"User","site_admin":false},"body":"This lets this client support ssl connections. I was relatively unsure of how to add tests for this, but have a staging environment setup with SSL support, so I've tested a number of failure scenarios and such.\r\n\r\nThis implements https://github.com/zendesk/ruby-kafka/issues/100.\r\n\r\nRuby SSL socket support is a nightmare, and actually impossible to use to do timeouts \"correctly\". I've left a lot of comments in the SSLSocketWithTimeout class to that effect.","created_at":"2016-03-04T13:25:55Z","updated_at":"2016-03-04T13:34:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85491cb38922d936ff0cbc445ce37ef0b9344836","assignee":null,"milestone":{"url":"https://api.github.com/repos/zendesk/ruby-kafka/milestones/4","html_url":"https://github.com/zendesk/ruby-kafka/milestones/v0.3","labels_url":"https://api.github.com/repos/zendesk/ruby-kafka/milestones/4/labels","id":1605319,"number":4,"title":"v0.3","description":"","creator":{"login":"dasch","id":6351,"avatar_url":"https://avatars.githubusercontent.com/u/6351?v=3","gravatar_id":"","url":"https://api.github.com/users/dasch","html_url":"https://github.com/dasch","followers_url":"https://api.github.com/users/dasch/followers","following_url":"https://api.github.com/users/dasch/following{/other_user}","gists_url":"https://api.github.com/users/dasch/gists{/gist_id}","starred_url":"https://api.github.com/users/dasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasch/subscriptions","organizations_url":"https://api.github.com/users/dasch/orgs","repos_url":"https://api.github.com/users/dasch/repos","events_url":"https://api.github.com/users/dasch/events{/privacy}","received_events_url":"https://api.github.com/users/dasch/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2016-02-25T14:35:05Z","updated_at":"2016-03-04T13:33:14Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116/commits","review_comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116/comments","review_comment_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/116/comments","statuses_url":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/dbd3964824c8867f7304a22c980bec0b5c533b9d","head":{"label":"tcrayford:ssl","ref":"ssl","sha":"dbd3964824c8867f7304a22c980bec0b5c533b9d","user":{"login":"tcrayford","id":55975,"avatar_url":"https://avatars.githubusercontent.com/u/55975?v=3","gravatar_id":"","url":"https://api.github.com/users/tcrayford","html_url":"https://github.com/tcrayford","followers_url":"https://api.github.com/users/tcrayford/followers","following_url":"https://api.github.com/users/tcrayford/following{/other_user}","gists_url":"https://api.github.com/users/tcrayford/gists{/gist_id}","starred_url":"https://api.github.com/users/tcrayford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcrayford/subscriptions","organizations_url":"https://api.github.com/users/tcrayford/orgs","repos_url":"https://api.github.com/users/tcrayford/repos","events_url":"https://api.github.com/users/tcrayford/events{/privacy}","received_events_url":"https://api.github.com/users/tcrayford/received_events","type":"User","site_admin":false},"repo":{"id":53136645,"name":"ruby-kafka","full_name":"tcrayford/ruby-kafka","owner":{"login":"tcrayford","id":55975,"avatar_url":"https://avatars.githubusercontent.com/u/55975?v=3","gravatar_id":"","url":"https://api.github.com/users/tcrayford","html_url":"https://github.com/tcrayford","followers_url":"https://api.github.com/users/tcrayford/followers","following_url":"https://api.github.com/users/tcrayford/following{/other_user}","gists_url":"https://api.github.com/users/tcrayford/gists{/gist_id}","starred_url":"https://api.github.com/users/tcrayford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcrayford/subscriptions","organizations_url":"https://api.github.com/users/tcrayford/orgs","repos_url":"https://api.github.com/users/tcrayford/repos","events_url":"https://api.github.com/users/tcrayford/events{/privacy}","received_events_url":"https://api.github.com/users/tcrayford/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tcrayford/ruby-kafka","description":"A Ruby client library for the Kafka distributed log system","fork":true,"url":"https://api.github.com/repos/tcrayford/ruby-kafka","forks_url":"https://api.github.com/repos/tcrayford/ruby-kafka/forks","keys_url":"https://api.github.com/repos/tcrayford/ruby-kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tcrayford/ruby-kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tcrayford/ruby-kafka/teams","hooks_url":"https://api.github.com/repos/tcrayford/ruby-kafka/hooks","issue_events_url":"https://api.github.com/repos/tcrayford/ruby-kafka/issues/events{/number}","events_url":"https://api.github.com/repos/tcrayford/ruby-kafka/events","assignees_url":"https://api.github.com/repos/tcrayford/ruby-kafka/assignees{/user}","branches_url":"https://api.github.com/repos/tcrayford/ruby-kafka/branches{/branch}","tags_url":"https://api.github.com/repos/tcrayford/ruby-kafka/tags","blobs_url":"https://api.github.com/repos/tcrayford/ruby-kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tcrayford/ruby-kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tcrayford/ruby-kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/tcrayford/ruby-kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tcrayford/ruby-kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/tcrayford/ruby-kafka/languages","stargazers_url":"https://api.github.com/repos/tcrayford/ruby-kafka/stargazers","contributors_url":"https://api.github.com/repos/tcrayford/ruby-kafka/contributors","subscribers_url":"https://api.github.com/repos/tcrayford/ruby-kafka/subscribers","subscription_url":"https://api.github.com/repos/tcrayford/ruby-kafka/subscription","commits_url":"https://api.github.com/repos/tcrayford/ruby-kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/tcrayford/ruby-kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/tcrayford/ruby-kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/tcrayford/ruby-kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/tcrayford/ruby-kafka/contents/{+path}","compare_url":"https://api.github.com/repos/tcrayford/ruby-kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tcrayford/ruby-kafka/merges","archive_url":"https://api.github.com/repos/tcrayford/ruby-kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tcrayford/ruby-kafka/downloads","issues_url":"https://api.github.com/repos/tcrayford/ruby-kafka/issues{/number}","pulls_url":"https://api.github.com/repos/tcrayford/ruby-kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/tcrayford/ruby-kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/tcrayford/ruby-kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tcrayford/ruby-kafka/labels{/name}","releases_url":"https://api.github.com/repos/tcrayford/ruby-kafka/releases{/id}","deployments_url":"https://api.github.com/repos/tcrayford/ruby-kafka/deployments","created_at":"2016-03-04T13:17:23Z","updated_at":"2016-03-04T13:17:24Z","pushed_at":"2016-03-04T13:17:40Z","git_url":"git://github.com/tcrayford/ruby-kafka.git","ssh_url":"git@github.com:tcrayford/ruby-kafka.git","clone_url":"https://github.com/tcrayford/ruby-kafka.git","svn_url":"https://github.com/tcrayford/ruby-kafka","homepage":"http://www.rubydoc.info/github/zendesk/ruby-kafka","size":477,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"6bc3f7165794591812b72adbb498aa19e913d24a","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":49878403,"name":"ruby-kafka","full_name":"zendesk/ruby-kafka","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/ruby-kafka","description":"A Ruby client library for the Kafka distributed log system","fork":false,"url":"https://api.github.com/repos/zendesk/ruby-kafka","forks_url":"https://api.github.com/repos/zendesk/ruby-kafka/forks","keys_url":"https://api.github.com/repos/zendesk/ruby-kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/ruby-kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/ruby-kafka/teams","hooks_url":"https://api.github.com/repos/zendesk/ruby-kafka/hooks","issue_events_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/ruby-kafka/events","assignees_url":"https://api.github.com/repos/zendesk/ruby-kafka/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/ruby-kafka/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/ruby-kafka/tags","blobs_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/ruby-kafka/languages","stargazers_url":"https://api.github.com/repos/zendesk/ruby-kafka/stargazers","contributors_url":"https://api.github.com/repos/zendesk/ruby-kafka/contributors","subscribers_url":"https://api.github.com/repos/zendesk/ruby-kafka/subscribers","subscription_url":"https://api.github.com/repos/zendesk/ruby-kafka/subscription","commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/ruby-kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/ruby-kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/ruby-kafka/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/ruby-kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/ruby-kafka/merges","archive_url":"https://api.github.com/repos/zendesk/ruby-kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/ruby-kafka/downloads","issues_url":"https://api.github.com/repos/zendesk/ruby-kafka/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/ruby-kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/ruby-kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/ruby-kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/ruby-kafka/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/ruby-kafka/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/ruby-kafka/deployments","created_at":"2016-01-18T13:24:55Z","updated_at":"2016-03-03T05:45:37Z","pushed_at":"2016-03-04T13:32:59Z","git_url":"git://github.com/zendesk/ruby-kafka.git","ssh_url":"git@github.com:zendesk/ruby-kafka.git","clone_url":"https://github.com/zendesk/ruby-kafka.git","svn_url":"https://github.com/zendesk/ruby-kafka","homepage":"http://www.rubydoc.info/github/zendesk/ruby-kafka","size":508,"stargazers_count":130,"watchers_count":130,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":17,"forks":5,"open_issues":17,"watchers":130,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116"},"html":{"href":"https://github.com/zendesk/ruby-kafka/pull/116"},"issue":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/issues/116"},"comments":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/ruby-kafka/statuses/dbd3964824c8867f7304a22c980bec0b5c533b9d"}}}}