{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/comments/50368168","id":50368168,"diff_hunk":"@@ -135,6 +143,9 @@ private[query] class EventsByTagPublisher(\n \n     case Cancel =>\n       context.stop(self)\n+\n+    case tagWritten: String if tagWritten == tag =>\n+      self ! Continue","path":"src/main/scala/akka/persistence/cassandra/query/EventsByTagPublisher.scala","position":28,"original_position":28,"commit_id":"c6db5e47a20d58fb245fff4145d24bd1a234930d","original_commit_id":"c6db5e47a20d58fb245fff4145d24bd1a234930d","user":{"login":"jypma","id":483519,"avatar_url":"https://avatars.githubusercontent.com/u/483519?v=3","gravatar_id":"","url":"https://api.github.com/users/jypma","html_url":"https://github.com/jypma","followers_url":"https://api.github.com/users/jypma/followers","following_url":"https://api.github.com/users/jypma/following{/other_user}","gists_url":"https://api.github.com/users/jypma/gists{/gist_id}","starred_url":"https://api.github.com/users/jypma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jypma/subscriptions","organizations_url":"https://api.github.com/users/jypma/orgs","repos_url":"https://api.github.com/users/jypma/repos","events_url":"https://api.github.com/users/jypma/events{/privacy}","received_events_url":"https://api.github.com/users/jypma/received_events","type":"User","site_admin":false},"body":"Yes, I'll have it ignore the pubsub (probably not even subscribe) when consistency-delay > max-early-poll-delay (~10ms) above.","created_at":"2016-01-21T07:34:31Z","updated_at":"2016-01-21T07:34:31Z","html_url":"https://github.com/akka/akka-persistence-cassandra/pull/20#discussion_r50368168","pull_request_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/comments/50368168"},"html":{"href":"https://github.com/akka/akka-persistence-cassandra/pull/20#discussion_r50368168"},"pull_request":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20","id":56578822,"html_url":"https://github.com/akka/akka-persistence-cassandra/pull/20","diff_url":"https://github.com/akka/akka-persistence-cassandra/pull/20.diff","patch_url":"https://github.com/akka/akka-persistence-cassandra/pull/20.patch","issue_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues/20","number":20,"state":"open","locked":false,"title":"Poll early when journal has written a tagged event","user":{"login":"jypma","id":483519,"avatar_url":"https://avatars.githubusercontent.com/u/483519?v=3","gravatar_id":"","url":"https://api.github.com/users/jypma","html_url":"https://github.com/jypma","followers_url":"https://api.github.com/users/jypma/followers","following_url":"https://api.github.com/users/jypma/following{/other_user}","gists_url":"https://api.github.com/users/jypma/gists{/gist_id}","starred_url":"https://api.github.com/users/jypma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jypma/subscriptions","organizations_url":"https://api.github.com/users/jypma/orgs","repos_url":"https://api.github.com/users/jypma/repos","events_url":"https://api.github.com/users/jypma/events{/privacy}","received_events_url":"https://api.github.com/users/jypma/received_events","type":"User","site_admin":false},"body":"We're applying akka-persistence-cassandra for a chat-like service, and would like emitted events to appear at an ongoing `getEventsByTag` stream as soon as possible. We're OK running with `eventual-consistency-delay = 0s`.\r\n\r\nThis PR signals any ongoing read queries whenever events matching a certain tag have been written to the journal. The query uses this information to do a cassandra poll ahead of time. This allows an ongoing stream to see that event almost immediately.\r\n\r\nWe do this using akka's clustered `DistributedPubSub` mechanism. When the application is not clustered, it will simply fall back to the existing polling.","created_at":"2016-01-20T08:48:38Z","updated_at":"2016-01-21T07:34:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c19759d0867c5ba293a155caebb873e63b1a867d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20/commits","review_comments_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20/comments","review_comment_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues/20/comments","statuses_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/statuses/c6db5e47a20d58fb245fff4145d24bd1a234930d","head":{"label":"jypma:realtime","ref":"realtime","sha":"c6db5e47a20d58fb245fff4145d24bd1a234930d","user":{"login":"jypma","id":483519,"avatar_url":"https://avatars.githubusercontent.com/u/483519?v=3","gravatar_id":"","url":"https://api.github.com/users/jypma","html_url":"https://github.com/jypma","followers_url":"https://api.github.com/users/jypma/followers","following_url":"https://api.github.com/users/jypma/following{/other_user}","gists_url":"https://api.github.com/users/jypma/gists{/gist_id}","starred_url":"https://api.github.com/users/jypma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jypma/subscriptions","organizations_url":"https://api.github.com/users/jypma/orgs","repos_url":"https://api.github.com/users/jypma/repos","events_url":"https://api.github.com/users/jypma/events{/privacy}","received_events_url":"https://api.github.com/users/jypma/received_events","type":"User","site_admin":false},"repo":{"id":35412195,"name":"akka-persistence-cassandra","full_name":"jypma/akka-persistence-cassandra","owner":{"login":"jypma","id":483519,"avatar_url":"https://avatars.githubusercontent.com/u/483519?v=3","gravatar_id":"","url":"https://api.github.com/users/jypma","html_url":"https://github.com/jypma","followers_url":"https://api.github.com/users/jypma/followers","following_url":"https://api.github.com/users/jypma/following{/other_user}","gists_url":"https://api.github.com/users/jypma/gists{/gist_id}","starred_url":"https://api.github.com/users/jypma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jypma/subscriptions","organizations_url":"https://api.github.com/users/jypma/orgs","repos_url":"https://api.github.com/users/jypma/repos","events_url":"https://api.github.com/users/jypma/events{/privacy}","received_events_url":"https://api.github.com/users/jypma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jypma/akka-persistence-cassandra","description":"A replicated Akka Persistence journal backed by Apache Cassandra","fork":true,"url":"https://api.github.com/repos/jypma/akka-persistence-cassandra","forks_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/forks","keys_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/teams","hooks_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/hooks","issue_events_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/issues/events{/number}","events_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/events","assignees_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/assignees{/user}","branches_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/branches{/branch}","tags_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/tags","blobs_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/git/refs{/sha}","trees_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/statuses/{sha}","languages_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/languages","stargazers_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/stargazers","contributors_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/contributors","subscribers_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/subscribers","subscription_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/subscription","commits_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/commits{/sha}","git_commits_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/git/commits{/sha}","comments_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/comments{/number}","issue_comment_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/issues/comments{/number}","contents_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/contents/{+path}","compare_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/merges","archive_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/downloads","issues_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/issues{/number}","pulls_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/pulls{/number}","milestones_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/milestones{/number}","notifications_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/labels{/name}","releases_url":"https://api.github.com/repos/jypma/akka-persistence-cassandra/releases{/id}","created_at":"2015-05-11T08:42:48Z","updated_at":"2015-05-11T08:42:48Z","pushed_at":"2016-01-20T10:32:23Z","git_url":"git://github.com/jypma/akka-persistence-cassandra.git","ssh_url":"git@github.com:jypma/akka-persistence-cassandra.git","clone_url":"https://github.com/jypma/akka-persistence-cassandra.git","svn_url":"https://github.com/jypma/akka-persistence-cassandra","homepage":"","size":393,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"akka:master","ref":"master","sha":"0539c3f52b47c703637a92c09fee3411f3d30750","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":48993109,"name":"akka-persistence-cassandra","full_name":"akka/akka-persistence-cassandra","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka-persistence-cassandra","description":"A replicated Akka Persistence journal backed by Apache Cassandra","fork":true,"url":"https://api.github.com/repos/akka/akka-persistence-cassandra","forks_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/forks","keys_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/teams","hooks_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/hooks","issue_events_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/events","assignees_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/tags","blobs_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/languages","stargazers_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/stargazers","contributors_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/contributors","subscribers_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/subscribers","subscription_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/subscription","commits_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/merges","archive_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/downloads","issues_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka-persistence-cassandra/releases{/id}","created_at":"2016-01-04T11:31:53Z","updated_at":"2016-01-18T02:34:52Z","pushed_at":"2016-01-20T19:03:05Z","git_url":"git://github.com/akka/akka-persistence-cassandra.git","ssh_url":"git@github.com:akka/akka-persistence-cassandra.git","clone_url":"https://github.com/akka/akka-persistence-cassandra.git","svn_url":"https://github.com/akka/akka-persistence-cassandra","homepage":"","size":512,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20"},"html":{"href":"https://github.com/akka/akka-persistence-cassandra/pull/20"},"issue":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues/20"},"comments":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka-persistence-cassandra/statuses/c6db5e47a20d58fb245fff4145d24bd1a234930d"}}}}