{"action":"created","comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/comments/51877029","id":51877029,"diff_hunk":"@@ -64,15 +65,18 @@ class LogStash::Filters::ZeroMQ < LogStash::Filters::Base\n   public\n   def initialize(params)\n     super(params)\n-\n-    @threadsafe = false\n   end\n \n+  ZmqThreadInfo = Struct.new(:zsocket, :poller)\n+\n   public\n   def register\n     require \"ffi-rzmq\"\n     require \"logstash/util/zeromq\"\n     self.class.send(:include, LogStash::Util::ZeroMQ)\n+\n+    # Map of threads to sockets\n+    @threads_sockets = Concurrent::Map.new","path":"lib/logstash/filters/zeromq.rb","position":25,"original_position":25,"commit_id":"ff4e3e12eda019449ad4de3f71c0dcd2298d7cbb","original_commit_id":"ff4e3e12eda019449ad4de3f71c0dcd2298d7cbb","user":{"login":"ph","id":640,"avatar_url":"https://avatars.githubusercontent.com/u/640?v=3","gravatar_id":"","url":"https://api.github.com/users/ph","html_url":"https://github.com/ph","followers_url":"https://api.github.com/users/ph/followers","following_url":"https://api.github.com/users/ph/following{/other_user}","gists_url":"https://api.github.com/users/ph/gists{/gist_id}","starred_url":"https://api.github.com/users/ph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ph/subscriptions","organizations_url":"https://api.github.com/users/ph/orgs","repos_url":"https://api.github.com/users/ph/repos","events_url":"https://api.github.com/users/ph/events{/privacy}","received_events_url":"https://api.github.com/users/ph/received_events","type":"User","site_admin":false},"body":"We already have `thread_safe` in the core :)","created_at":"2016-02-04T14:16:13Z","updated_at":"2016-02-04T14:16:13Z","html_url":"https://github.com/logstash-plugins/logstash-filter-zeromq/pull/10#discussion_r51877029","pull_request_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/comments/51877029"},"html":{"href":"https://github.com/logstash-plugins/logstash-filter-zeromq/pull/10#discussion_r51877029"},"pull_request":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10","id":58198539,"html_url":"https://github.com/logstash-plugins/logstash-filter-zeromq/pull/10","diff_url":"https://github.com/logstash-plugins/logstash-filter-zeromq/pull/10.diff","patch_url":"https://github.com/logstash-plugins/logstash-filter-zeromq/pull/10.patch","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues/10","number":10,"state":"open","locked":false,"title":"Make the thing threadsafe","user":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/elastic/logstash/issues/4625 and makes this thing able to use multiple workers.\r\n\r\nSlight problem.... no tests in this plugin :(","created_at":"2016-02-03T20:52:02Z","updated_at":"2016-02-04T14:16:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d948eb0dfeeba8613ea73a924321927bb67a371","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10/commits","review_comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10/comments","review_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues/10/comments","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/statuses/ff4e3e12eda019449ad4de3f71c0dcd2298d7cbb","head":{"label":"andrewvc:make-this-thing-threadsafe","ref":"make-this-thing-threadsafe","sha":"ff4e3e12eda019449ad4de3f71c0dcd2298d7cbb","user":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"repo":{"id":51029705,"name":"logstash-filter-zeromq","full_name":"andrewvc/logstash-filter-zeromq","owner":{"login":"andrewvc","id":131427,"avatar_url":"https://avatars.githubusercontent.com/u/131427?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewvc/logstash-filter-zeromq","description":null,"fork":true,"url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq","forks_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/forks","keys_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/teams","hooks_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/hooks","issue_events_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/issues/events{/number}","events_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/events","assignees_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/assignees{/user}","branches_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/branches{/branch}","tags_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/tags","blobs_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/languages","stargazers_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/stargazers","contributors_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/contributors","subscribers_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/subscribers","subscription_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/subscription","commits_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/contents/{+path}","compare_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/merges","archive_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/downloads","issues_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/issues{/number}","pulls_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/labels{/name}","releases_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/releases{/id}","deployments_url":"https://api.github.com/repos/andrewvc/logstash-filter-zeromq/deployments","created_at":"2016-02-03T20:51:21Z","updated_at":"2016-02-03T20:51:21Z","pushed_at":"2016-02-03T20:51:32Z","git_url":"git://github.com/andrewvc/logstash-filter-zeromq.git","ssh_url":"git@github.com:andrewvc/logstash-filter-zeromq.git","clone_url":"https://github.com/andrewvc/logstash-filter-zeromq.git","svn_url":"https://github.com/andrewvc/logstash-filter-zeromq","homepage":null,"size":23,"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":"logstash-plugins:master","ref":"master","sha":"9bfcd05a29fc32b13982d957f50461649b53b396","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":26478619,"name":"logstash-filter-zeromq","full_name":"logstash-plugins/logstash-filter-zeromq","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logstash-plugins/logstash-filter-zeromq","description":null,"fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/releases{/id}","deployments_url":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/deployments","created_at":"2014-11-11T09:41:49Z","updated_at":"2015-11-13T10:33:47Z","pushed_at":"2016-02-03T20:52:02Z","git_url":"git://github.com/logstash-plugins/logstash-filter-zeromq.git","ssh_url":"git@github.com:logstash-plugins/logstash-filter-zeromq.git","clone_url":"https://github.com/logstash-plugins/logstash-filter-zeromq.git","svn_url":"https://github.com/logstash-plugins/logstash-filter-zeromq","homepage":null,"size":293,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10"},"html":{"href":"https://github.com/logstash-plugins/logstash-filter-zeromq/pull/10"},"issue":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues/10"},"comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/logstash-plugins/logstash-filter-zeromq/statuses/ff4e3e12eda019449ad4de3f71c0dcd2298d7cbb"}}}}