{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/vert.x/pulls/comments/37299510","id":37299510,"diff_hunk":"@@ -56,25 +57,37 @@\n   protected Handler<Void> closeHandler;\n   protected Handler<Void> endHandler;\n   protected boolean closed;\n-\n+  private EventBus eventBus;\n   protected WebSocketImplBase(VertxInternal vertx, ConnectionBase conn, boolean supportsContinuation,\n                               int maxWebSocketFrameSize) {\n     this.supportsContinuation = supportsContinuation;\n-    this.textHandlerID = UUID.randomUUID().toString();\n-    this.binaryHandlerID = UUID.randomUUID().toString();\n     this.conn = conn;\n-    Handler<Message<Buffer>> binaryHandler = msg -> writeBinaryFrameInternal(msg.body());\n-    binaryHandlerRegistration = vertx.eventBus().<Buffer>localConsumer(binaryHandlerID).handler(binaryHandler);\n-    Handler<Message<String>> textHandler = msg -> writeTextFrameInternal(msg.body());\n-    textHandlerRegistration = vertx.eventBus().<String>localConsumer(textHandlerID).handler(textHandler);\n+    this.eventBus = vertx.eventBus();\n     this.maxWebSocketFrameSize = maxWebSocketFrameSize;\n   }\n-\n   public String binaryHandlerID() {\n+\t  return binaryHandlerID(false);\n+  }\n+  \n+  public synchronized String binaryHandlerID(boolean cluster) {\n+    if(binaryHandlerID == null){","path":"src/main/java/io/vertx/core/http/impl/WebSocketImplBase.java","position":49,"original_position":49,"commit_id":"6f0983e85257aa09b2f8a853db350dbfb349cb6c","original_commit_id":"6f0983e85257aa09b2f8a853db350dbfb349cb6c","user":{"login":"purplefox","id":701906,"avatar_url":"https://avatars.githubusercontent.com/u/701906?v=3","gravatar_id":"","url":"https://api.github.com/users/purplefox","html_url":"https://github.com/purplefox","followers_url":"https://api.github.com/users/purplefox/followers","following_url":"https://api.github.com/users/purplefox/following{/other_user}","gists_url":"https://api.github.com/users/purplefox/gists{/gist_id}","starred_url":"https://api.github.com/users/purplefox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/purplefox/subscriptions","organizations_url":"https://api.github.com/users/purplefox/orgs","repos_url":"https://api.github.com/users/purplefox/repos","events_url":"https://api.github.com/users/purplefox/events{/privacy}","received_events_url":"https://api.github.com/users/purplefox/received_events","type":"User","site_admin":false},"body":"cosmetics, please use appropriate whitespace (see code style guidelines on the wiki)","created_at":"2015-08-18T13:50:58Z","updated_at":"2015-08-18T13:50:58Z","html_url":"https://github.com/eclipse/vert.x/pull/1090#discussion_r37299510","pull_request_url":"https://api.github.com/repos/eclipse/vert.x/pulls/1090","_links":{"self":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/comments/37299510"},"html":{"href":"https://github.com/eclipse/vert.x/pull/1090#discussion_r37299510"},"pull_request":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1090"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/vert.x/pulls/1090","id":38509247,"html_url":"https://github.com/eclipse/vert.x/pull/1090","diff_url":"https://github.com/eclipse/vert.x/pull/1090.diff","patch_url":"https://github.com/eclipse/vert.x/pull/1090.patch","issue_url":"https://api.github.com/repos/eclipse/vert.x/issues/1090","number":1090,"state":"open","locked":false,"title":"Register binary and text frame handler in websocket as needed & Allow send websocket frame from any verticle in cluster ","user":{"login":"dinhnn","id":1657667,"avatar_url":"https://avatars.githubusercontent.com/u/1657667?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhnn","html_url":"https://github.com/dinhnn","followers_url":"https://api.github.com/users/dinhnn/followers","following_url":"https://api.github.com/users/dinhnn/following{/other_user}","gists_url":"https://api.github.com/users/dinhnn/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhnn/subscriptions","organizations_url":"https://api.github.com/users/dinhnn/orgs","repos_url":"https://api.github.com/users/dinhnn/repos","events_url":"https://api.github.com/users/dinhnn/events{/privacy}","received_events_url":"https://api.github.com/users/dinhnn/received_events","type":"User","site_admin":false},"body":"Register binary and text handler as needed. It will reduce number of event bus address\r\nAllow send websocket frame from any verticle in cluster via eventbus","created_at":"2015-06-25T03:34:42Z","updated_at":"2015-08-18T13:50:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abc57a9a167f07498a5bdd5514fa39923abf2d0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/vert.x/pulls/1090/commits","review_comments_url":"https://api.github.com/repos/eclipse/vert.x/pulls/1090/comments","review_comment_url":"https://api.github.com/repos/eclipse/vert.x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/vert.x/issues/1090/comments","statuses_url":"https://api.github.com/repos/eclipse/vert.x/statuses/6f0983e85257aa09b2f8a853db350dbfb349cb6c","head":{"label":"dinhnn:master","ref":"master","sha":"6f0983e85257aa09b2f8a853db350dbfb349cb6c","user":{"login":"dinhnn","id":1657667,"avatar_url":"https://avatars.githubusercontent.com/u/1657667?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhnn","html_url":"https://github.com/dinhnn","followers_url":"https://api.github.com/users/dinhnn/followers","following_url":"https://api.github.com/users/dinhnn/following{/other_user}","gists_url":"https://api.github.com/users/dinhnn/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhnn/subscriptions","organizations_url":"https://api.github.com/users/dinhnn/orgs","repos_url":"https://api.github.com/users/dinhnn/repos","events_url":"https://api.github.com/users/dinhnn/events{/privacy}","received_events_url":"https://api.github.com/users/dinhnn/received_events","type":"User","site_admin":false},"repo":{"id":37999189,"name":"vert.x","full_name":"dinhnn/vert.x","owner":{"login":"dinhnn","id":1657667,"avatar_url":"https://avatars.githubusercontent.com/u/1657667?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhnn","html_url":"https://github.com/dinhnn","followers_url":"https://api.github.com/users/dinhnn/followers","following_url":"https://api.github.com/users/dinhnn/following{/other_user}","gists_url":"https://api.github.com/users/dinhnn/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhnn/subscriptions","organizations_url":"https://api.github.com/users/dinhnn/orgs","repos_url":"https://api.github.com/users/dinhnn/repos","events_url":"https://api.github.com/users/dinhnn/events{/privacy}","received_events_url":"https://api.github.com/users/dinhnn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dinhnn/vert.x","description":"vert.x - The scalable polyglot application platform for the JVM","fork":true,"url":"https://api.github.com/repos/dinhnn/vert.x","forks_url":"https://api.github.com/repos/dinhnn/vert.x/forks","keys_url":"https://api.github.com/repos/dinhnn/vert.x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dinhnn/vert.x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dinhnn/vert.x/teams","hooks_url":"https://api.github.com/repos/dinhnn/vert.x/hooks","issue_events_url":"https://api.github.com/repos/dinhnn/vert.x/issues/events{/number}","events_url":"https://api.github.com/repos/dinhnn/vert.x/events","assignees_url":"https://api.github.com/repos/dinhnn/vert.x/assignees{/user}","branches_url":"https://api.github.com/repos/dinhnn/vert.x/branches{/branch}","tags_url":"https://api.github.com/repos/dinhnn/vert.x/tags","blobs_url":"https://api.github.com/repos/dinhnn/vert.x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dinhnn/vert.x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dinhnn/vert.x/git/refs{/sha}","trees_url":"https://api.github.com/repos/dinhnn/vert.x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dinhnn/vert.x/statuses/{sha}","languages_url":"https://api.github.com/repos/dinhnn/vert.x/languages","stargazers_url":"https://api.github.com/repos/dinhnn/vert.x/stargazers","contributors_url":"https://api.github.com/repos/dinhnn/vert.x/contributors","subscribers_url":"https://api.github.com/repos/dinhnn/vert.x/subscribers","subscription_url":"https://api.github.com/repos/dinhnn/vert.x/subscription","commits_url":"https://api.github.com/repos/dinhnn/vert.x/commits{/sha}","git_commits_url":"https://api.github.com/repos/dinhnn/vert.x/git/commits{/sha}","comments_url":"https://api.github.com/repos/dinhnn/vert.x/comments{/number}","issue_comment_url":"https://api.github.com/repos/dinhnn/vert.x/issues/comments{/number}","contents_url":"https://api.github.com/repos/dinhnn/vert.x/contents/{+path}","compare_url":"https://api.github.com/repos/dinhnn/vert.x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dinhnn/vert.x/merges","archive_url":"https://api.github.com/repos/dinhnn/vert.x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dinhnn/vert.x/downloads","issues_url":"https://api.github.com/repos/dinhnn/vert.x/issues{/number}","pulls_url":"https://api.github.com/repos/dinhnn/vert.x/pulls{/number}","milestones_url":"https://api.github.com/repos/dinhnn/vert.x/milestones{/number}","notifications_url":"https://api.github.com/repos/dinhnn/vert.x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dinhnn/vert.x/labels{/name}","releases_url":"https://api.github.com/repos/dinhnn/vert.x/releases{/id}","created_at":"2015-06-24T17:17:33Z","updated_at":"2015-06-24T17:17:36Z","pushed_at":"2015-06-30T05:08:02Z","git_url":"git://github.com/dinhnn/vert.x.git","ssh_url":"git@github.com:dinhnn/vert.x.git","clone_url":"https://github.com/dinhnn/vert.x.git","svn_url":"https://github.com/dinhnn/vert.x","homepage":"","size":93432,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"821464ee695e5d6f2bd8ad06d16cb8a49699c285","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":1911523,"name":"vert.x","full_name":"eclipse/vert.x","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/vert.x","description":"Vert.x is a tool-kit for building reactive applications on the JVM","fork":false,"url":"https://api.github.com/repos/eclipse/vert.x","forks_url":"https://api.github.com/repos/eclipse/vert.x/forks","keys_url":"https://api.github.com/repos/eclipse/vert.x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/vert.x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/vert.x/teams","hooks_url":"https://api.github.com/repos/eclipse/vert.x/hooks","issue_events_url":"https://api.github.com/repos/eclipse/vert.x/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/vert.x/events","assignees_url":"https://api.github.com/repos/eclipse/vert.x/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/vert.x/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/vert.x/tags","blobs_url":"https://api.github.com/repos/eclipse/vert.x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/vert.x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/vert.x/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/vert.x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/vert.x/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/vert.x/languages","stargazers_url":"https://api.github.com/repos/eclipse/vert.x/stargazers","contributors_url":"https://api.github.com/repos/eclipse/vert.x/contributors","subscribers_url":"https://api.github.com/repos/eclipse/vert.x/subscribers","subscription_url":"https://api.github.com/repos/eclipse/vert.x/subscription","commits_url":"https://api.github.com/repos/eclipse/vert.x/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/vert.x/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/vert.x/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/vert.x/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/vert.x/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/vert.x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/vert.x/merges","archive_url":"https://api.github.com/repos/eclipse/vert.x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/vert.x/downloads","issues_url":"https://api.github.com/repos/eclipse/vert.x/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/vert.x/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/vert.x/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/vert.x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/vert.x/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/vert.x/releases{/id}","created_at":"2011-06-17T14:54:55Z","updated_at":"2015-08-18T09:21:15Z","pushed_at":"2015-08-18T13:13:25Z","git_url":"git://github.com/eclipse/vert.x.git","ssh_url":"git@github.com:eclipse/vert.x.git","clone_url":"https://github.com/eclipse/vert.x.git","svn_url":"https://github.com/eclipse/vert.x","homepage":"http://vertx.io","size":380730,"stargazers_count":3881,"watchers_count":3881,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":770,"mirror_url":null,"open_issues_count":15,"forks":770,"open_issues":15,"watchers":3881,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1090"},"html":{"href":"https://github.com/eclipse/vert.x/pull/1090"},"issue":{"href":"https://api.github.com/repos/eclipse/vert.x/issues/1090"},"comments":{"href":"https://api.github.com/repos/eclipse/vert.x/issues/1090/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1090/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1090/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/vert.x/statuses/6f0983e85257aa09b2f8a853db350dbfb349cb6c"}}}}