{"action":"created","comment":{"url":"https://api.github.com/repos/xjdr/chicago/pulls/comments/74782369","id":74782369,"diff_hunk":"@@ -0,0 +1,37 @@\n+package com.xjeffrose.chicago;\n+\n+import io.netty.channel.ChannelHandlerContext;\n+import io.netty.handler.codec.MessageToMessageDecoder;\n+import java.util.List;\n+import java.util.concurrent.atomic.AtomicBoolean;\n+\n+public class ChicagoMessageAggregator extends MessageToMessageDecoder<ChicagoMessage> {\n+  private final AtomicBoolean started = new AtomicBoolean();\n+  private AggregatedChicagoMessage aggregatedMessage;\n+\n+  private void aggregate(ChicagoMessage msg) {\n+    if (started.get()) {\n+      aggregatedMessage.appendVal(msg.getVal());\n+    } else {\n+      aggregatedMessage = new AggregatedChicagoMessage(msg);\n+      started.set(true);\n+    }\n+  }\n+\n+\n+  @Override\n+  protected void decode(ChannelHandlerContext ctx, ChicagoMessage msg, List<Object> out) throws Exception {\n+\n+    switch (msg.getOp()) {\n+      case STREAM_RESPONSE:\n+        aggregate(msg);\n+        if (new String(msg.getVal()).contains(ChiUtil.delimiter)) {\n+          out.add(aggregatedMessage);","path":"src/main/java/com/xjeffrose/chicago/ChicagoMessageAggregator.java","position":29,"original_position":29,"commit_id":"34d3764b2d1bd5d83f7b74b4e72467ad6bca96ec","original_commit_id":"32845e544bb90c230b6228a189bbd28123e7569e","user":{"login":"otoolec","id":1630589,"avatar_url":"https://avatars.githubusercontent.com/u/1630589?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolec","html_url":"https://github.com/otoolec","followers_url":"https://api.github.com/users/otoolec/followers","following_url":"https://api.github.com/users/otoolec/following{/other_user}","gists_url":"https://api.github.com/users/otoolec/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolec/subscriptions","organizations_url":"https://api.github.com/users/otoolec/orgs","repos_url":"https://api.github.com/users/otoolec/repos","events_url":"https://api.github.com/users/otoolec/events{/privacy}","received_events_url":"https://api.github.com/users/otoolec/received_events","type":"User","site_admin":false},"body":"I see you changed this but want to understand how it will work.\r\n\r\nWon't the pipeline/channel get re-used in the RequestMuxer connection pool?  That would mean all the handlers should expect to see multiple messages and potentially multiple stream responses, right?","created_at":"2016-08-15T15:46:37Z","updated_at":"2016-08-15T15:46:37Z","html_url":"https://github.com/xjdr/chicago/pull/63#discussion_r74782369","pull_request_url":"https://api.github.com/repos/xjdr/chicago/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/xjdr/chicago/pulls/comments/74782369"},"html":{"href":"https://github.com/xjdr/chicago/pull/63#discussion_r74782369"},"pull_request":{"href":"https://api.github.com/repos/xjdr/chicago/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/xjdr/chicago/pulls/63","id":81263358,"html_url":"https://github.com/xjdr/chicago/pull/63","diff_url":"https://github.com/xjdr/chicago/pull/63.diff","patch_url":"https://github.com/xjdr/chicago/pull/63.patch","issue_url":"https://api.github.com/repos/xjdr/chicago/issues/63","number":63,"state":"open","locked":false,"title":"working aggregator","user":{"login":"xjdr","id":2508631,"avatar_url":"https://avatars.githubusercontent.com/u/2508631?v=3","gravatar_id":"","url":"https://api.github.com/users/xjdr","html_url":"https://github.com/xjdr","followers_url":"https://api.github.com/users/xjdr/followers","following_url":"https://api.github.com/users/xjdr/following{/other_user}","gists_url":"https://api.github.com/users/xjdr/gists{/gist_id}","starred_url":"https://api.github.com/users/xjdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjdr/subscriptions","organizations_url":"https://api.github.com/users/xjdr/orgs","repos_url":"https://api.github.com/users/xjdr/repos","events_url":"https://api.github.com/users/xjdr/events{/privacy}","received_events_url":"https://api.github.com/users/xjdr/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-15T02:20:31Z","updated_at":"2016-08-15T15:46:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3b81dfd5efbcdf2ddb8acc6357af8503d5c0e19","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xjdr/chicago/pulls/63/commits","review_comments_url":"https://api.github.com/repos/xjdr/chicago/pulls/63/comments","review_comment_url":"https://api.github.com/repos/xjdr/chicago/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xjdr/chicago/issues/63/comments","statuses_url":"https://api.github.com/repos/xjdr/chicago/statuses/34d3764b2d1bd5d83f7b74b4e72467ad6bca96ec","head":{"label":"xjdr:workingAggregator","ref":"workingAggregator","sha":"34d3764b2d1bd5d83f7b74b4e72467ad6bca96ec","user":{"login":"xjdr","id":2508631,"avatar_url":"https://avatars.githubusercontent.com/u/2508631?v=3","gravatar_id":"","url":"https://api.github.com/users/xjdr","html_url":"https://github.com/xjdr","followers_url":"https://api.github.com/users/xjdr/followers","following_url":"https://api.github.com/users/xjdr/following{/other_user}","gists_url":"https://api.github.com/users/xjdr/gists{/gist_id}","starred_url":"https://api.github.com/users/xjdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjdr/subscriptions","organizations_url":"https://api.github.com/users/xjdr/orgs","repos_url":"https://api.github.com/users/xjdr/repos","events_url":"https://api.github.com/users/xjdr/events{/privacy}","received_events_url":"https://api.github.com/users/xjdr/received_events","type":"User","site_admin":false},"repo":{"id":58682610,"name":"chicago","full_name":"xjdr/chicago","owner":{"login":"xjdr","id":2508631,"avatar_url":"https://avatars.githubusercontent.com/u/2508631?v=3","gravatar_id":"","url":"https://api.github.com/users/xjdr","html_url":"https://github.com/xjdr","followers_url":"https://api.github.com/users/xjdr/followers","following_url":"https://api.github.com/users/xjdr/following{/other_user}","gists_url":"https://api.github.com/users/xjdr/gists{/gist_id}","starred_url":"https://api.github.com/users/xjdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjdr/subscriptions","organizations_url":"https://api.github.com/users/xjdr/orgs","repos_url":"https://api.github.com/users/xjdr/repos","events_url":"https://api.github.com/users/xjdr/events{/privacy}","received_events_url":"https://api.github.com/users/xjdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xjdr/chicago","description":"High Performance Distributed Key Value Store ","fork":false,"url":"https://api.github.com/repos/xjdr/chicago","forks_url":"https://api.github.com/repos/xjdr/chicago/forks","keys_url":"https://api.github.com/repos/xjdr/chicago/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xjdr/chicago/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xjdr/chicago/teams","hooks_url":"https://api.github.com/repos/xjdr/chicago/hooks","issue_events_url":"https://api.github.com/repos/xjdr/chicago/issues/events{/number}","events_url":"https://api.github.com/repos/xjdr/chicago/events","assignees_url":"https://api.github.com/repos/xjdr/chicago/assignees{/user}","branches_url":"https://api.github.com/repos/xjdr/chicago/branches{/branch}","tags_url":"https://api.github.com/repos/xjdr/chicago/tags","blobs_url":"https://api.github.com/repos/xjdr/chicago/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xjdr/chicago/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xjdr/chicago/git/refs{/sha}","trees_url":"https://api.github.com/repos/xjdr/chicago/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xjdr/chicago/statuses/{sha}","languages_url":"https://api.github.com/repos/xjdr/chicago/languages","stargazers_url":"https://api.github.com/repos/xjdr/chicago/stargazers","contributors_url":"https://api.github.com/repos/xjdr/chicago/contributors","subscribers_url":"https://api.github.com/repos/xjdr/chicago/subscribers","subscription_url":"https://api.github.com/repos/xjdr/chicago/subscription","commits_url":"https://api.github.com/repos/xjdr/chicago/commits{/sha}","git_commits_url":"https://api.github.com/repos/xjdr/chicago/git/commits{/sha}","comments_url":"https://api.github.com/repos/xjdr/chicago/comments{/number}","issue_comment_url":"https://api.github.com/repos/xjdr/chicago/issues/comments{/number}","contents_url":"https://api.github.com/repos/xjdr/chicago/contents/{+path}","compare_url":"https://api.github.com/repos/xjdr/chicago/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xjdr/chicago/merges","archive_url":"https://api.github.com/repos/xjdr/chicago/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xjdr/chicago/downloads","issues_url":"https://api.github.com/repos/xjdr/chicago/issues{/number}","pulls_url":"https://api.github.com/repos/xjdr/chicago/pulls{/number}","milestones_url":"https://api.github.com/repos/xjdr/chicago/milestones{/number}","notifications_url":"https://api.github.com/repos/xjdr/chicago/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xjdr/chicago/labels{/name}","releases_url":"https://api.github.com/repos/xjdr/chicago/releases{/id}","deployments_url":"https://api.github.com/repos/xjdr/chicago/deployments","created_at":"2016-05-12T22:53:41Z","updated_at":"2016-05-27T19:18:49Z","pushed_at":"2016-08-15T11:28:30Z","git_url":"git://github.com/xjdr/chicago.git","ssh_url":"git@github.com:xjdr/chicago.git","clone_url":"https://github.com/xjdr/chicago.git","svn_url":"https://github.com/xjdr/chicago","homepage":"","size":11434,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":1,"default_branch":"develop"}},"base":{"label":"xjdr:develop","ref":"develop","sha":"a9f79e5f22675bf377f1c309ce5b6d174d1c5765","user":{"login":"xjdr","id":2508631,"avatar_url":"https://avatars.githubusercontent.com/u/2508631?v=3","gravatar_id":"","url":"https://api.github.com/users/xjdr","html_url":"https://github.com/xjdr","followers_url":"https://api.github.com/users/xjdr/followers","following_url":"https://api.github.com/users/xjdr/following{/other_user}","gists_url":"https://api.github.com/users/xjdr/gists{/gist_id}","starred_url":"https://api.github.com/users/xjdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjdr/subscriptions","organizations_url":"https://api.github.com/users/xjdr/orgs","repos_url":"https://api.github.com/users/xjdr/repos","events_url":"https://api.github.com/users/xjdr/events{/privacy}","received_events_url":"https://api.github.com/users/xjdr/received_events","type":"User","site_admin":false},"repo":{"id":58682610,"name":"chicago","full_name":"xjdr/chicago","owner":{"login":"xjdr","id":2508631,"avatar_url":"https://avatars.githubusercontent.com/u/2508631?v=3","gravatar_id":"","url":"https://api.github.com/users/xjdr","html_url":"https://github.com/xjdr","followers_url":"https://api.github.com/users/xjdr/followers","following_url":"https://api.github.com/users/xjdr/following{/other_user}","gists_url":"https://api.github.com/users/xjdr/gists{/gist_id}","starred_url":"https://api.github.com/users/xjdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjdr/subscriptions","organizations_url":"https://api.github.com/users/xjdr/orgs","repos_url":"https://api.github.com/users/xjdr/repos","events_url":"https://api.github.com/users/xjdr/events{/privacy}","received_events_url":"https://api.github.com/users/xjdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xjdr/chicago","description":"High Performance Distributed Key Value Store ","fork":false,"url":"https://api.github.com/repos/xjdr/chicago","forks_url":"https://api.github.com/repos/xjdr/chicago/forks","keys_url":"https://api.github.com/repos/xjdr/chicago/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xjdr/chicago/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xjdr/chicago/teams","hooks_url":"https://api.github.com/repos/xjdr/chicago/hooks","issue_events_url":"https://api.github.com/repos/xjdr/chicago/issues/events{/number}","events_url":"https://api.github.com/repos/xjdr/chicago/events","assignees_url":"https://api.github.com/repos/xjdr/chicago/assignees{/user}","branches_url":"https://api.github.com/repos/xjdr/chicago/branches{/branch}","tags_url":"https://api.github.com/repos/xjdr/chicago/tags","blobs_url":"https://api.github.com/repos/xjdr/chicago/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xjdr/chicago/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xjdr/chicago/git/refs{/sha}","trees_url":"https://api.github.com/repos/xjdr/chicago/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xjdr/chicago/statuses/{sha}","languages_url":"https://api.github.com/repos/xjdr/chicago/languages","stargazers_url":"https://api.github.com/repos/xjdr/chicago/stargazers","contributors_url":"https://api.github.com/repos/xjdr/chicago/contributors","subscribers_url":"https://api.github.com/repos/xjdr/chicago/subscribers","subscription_url":"https://api.github.com/repos/xjdr/chicago/subscription","commits_url":"https://api.github.com/repos/xjdr/chicago/commits{/sha}","git_commits_url":"https://api.github.com/repos/xjdr/chicago/git/commits{/sha}","comments_url":"https://api.github.com/repos/xjdr/chicago/comments{/number}","issue_comment_url":"https://api.github.com/repos/xjdr/chicago/issues/comments{/number}","contents_url":"https://api.github.com/repos/xjdr/chicago/contents/{+path}","compare_url":"https://api.github.com/repos/xjdr/chicago/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xjdr/chicago/merges","archive_url":"https://api.github.com/repos/xjdr/chicago/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xjdr/chicago/downloads","issues_url":"https://api.github.com/repos/xjdr/chicago/issues{/number}","pulls_url":"https://api.github.com/repos/xjdr/chicago/pulls{/number}","milestones_url":"https://api.github.com/repos/xjdr/chicago/milestones{/number}","notifications_url":"https://api.github.com/repos/xjdr/chicago/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xjdr/chicago/labels{/name}","releases_url":"https://api.github.com/repos/xjdr/chicago/releases{/id}","deployments_url":"https://api.github.com/repos/xjdr/chicago/deployments","created_at":"2016-05-12T22:53:41Z","updated_at":"2016-05-27T19:18:49Z","pushed_at":"2016-08-15T11:28:30Z","git_url":"git://github.com/xjdr/chicago.git","ssh_url":"git@github.com:xjdr/chicago.git","clone_url":"https://github.com/xjdr/chicago.git","svn_url":"https://github.com/xjdr/chicago","homepage":"","size":11434,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/xjdr/chicago/pulls/63"},"html":{"href":"https://github.com/xjdr/chicago/pull/63"},"issue":{"href":"https://api.github.com/repos/xjdr/chicago/issues/63"},"comments":{"href":"https://api.github.com/repos/xjdr/chicago/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/xjdr/chicago/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/xjdr/chicago/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xjdr/chicago/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/xjdr/chicago/statuses/34d3764b2d1bd5d83f7b74b4e72467ad6bca96ec"}}}}
{"actor":{"display_login":"otoolec"}}