{"action":"created","comment":{"url":"https://api.github.com/repos/akka/reactive-kafka/pulls/comments/192090545","pull_request_review_id":124793311,"id":192090545,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjA5MDU0NQ==","diff_hunk":"@@ -0,0 +1,149 @@\n+/*\n+ * Copyright (C) 2014 - 2016 Softwaremill <http://softwaremill.com>\n+ * Copyright (C) 2016 - 2018 Lightbend Inc. <http://www.lightbend.com>\n+ */\n+\n+package akka.kafka\n+\n+import java.util.Optional\n+\n+import akka.actor.NoSerializationVerificationNeeded\n+import org.apache.kafka.clients.consumer.{OffsetAndMetadata, OffsetAndTimestamp}\n+import org.apache.kafka.common.{PartitionInfo, TopicPartition}\n+\n+import scala.collection.JavaConverters._\n+import scala.util.Try\n+\n+/**\n+ * Messages for Kafka metadata fetching via [[KafkaConsumerActor]].\n+ *\n+ * NOTE: Processing of these requests blocks the actor loop. The KafkaConsumerActor is configured to run on its\n+ * own dispatcher, so just as the other remote calls to Kafka, the blocking happens within a designated thread pool.\n+ * However, calling these during consuming might affect performance and even cause timeouts in extreme cases.\n+ */\n+object Metadata {\n+\n+  sealed trait Request\n+  sealed trait Response\n+\n+  /**\n+   * [[org.apache.kafka.clients.consumer.KafkaConsumer#listTopics()]]\n+   */\n+  case object ListTopics extends Request with NoSerializationVerificationNeeded\n+  final case class Topics(response: Try[Map[String, List[PartitionInfo]]]) extends Response with NoSerializationVerificationNeeded {\n+    /**\n+     * Java API\n+     */\n+    def getResponse: Optional[java.util.Map[String, java.util.List[PartitionInfo]]] =\n+      response.map { m => Optional.of(m.mapValues(_.asJava).asJava) }.getOrElse(Optional.empty())\n+  }\n+\n+  /**\n+   * Java API:\n+   * [[org.apache.kafka.clients.consumer.KafkaConsumer#listTopics()]]\n+   */\n+  val listTopics: ListTopics.type = ListTopics\n+\n+  /**\n+   * [[org.apache.kafka.clients.consumer.KafkaConsumer#partitionsFor()]]\n+   */\n+  final case class GetPartitionsFor(topic: String) extends Request with NoSerializationVerificationNeeded","path":"core/src/main/scala/akka/kafka/Metadata.scala","position":50,"original_position":50,"commit_id":"fa2b82795b6603916738f55e3109cdcd87901ca7","original_commit_id":"fa2b82795b6603916738f55e3109cdcd87901ca7","user":{"login":"2m","id":422086,"node_id":"MDQ6VXNlcjQyMjA4Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/422086?v=4","gravatar_id":"","url":"https://api.github.com/users/2m","html_url":"https://github.com/2m","followers_url":"https://api.github.com/users/2m/followers","following_url":"https://api.github.com/users/2m/following{/other_user}","gists_url":"https://api.github.com/users/2m/gists{/gist_id}","starred_url":"https://api.github.com/users/2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2m/subscriptions","organizations_url":"https://api.github.com/users/2m/orgs","repos_url":"https://api.github.com/users/2m/repos","events_url":"https://api.github.com/users/2m/events{/privacy}","received_events_url":"https://api.github.com/users/2m/received_events","type":"User","site_admin":false},"body":"Add `create(...)` methods for the Java API for this request message and others below. ","created_at":"2018-05-31T13:01:16Z","updated_at":"2018-05-31T13:02:04Z","html_url":"https://github.com/akka/reactive-kafka/pull/491#discussion_r192090545","pull_request_url":"https://api.github.com/repos/akka/reactive-kafka/pulls/491","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/akka/reactive-kafka/pulls/comments/192090545"},"html":{"href":"https://github.com/akka/reactive-kafka/pull/491#discussion_r192090545"},"pull_request":{"href":"https://api.github.com/repos/akka/reactive-kafka/pulls/491"}}},"pull_request":{"url":"https://api.github.com/repos/akka/reactive-kafka/pulls/491","id":191671420,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjcxNDIw","html_url":"https://github.com/akka/reactive-kafka/pull/491","diff_url":"https://github.com/akka/reactive-kafka/pull/491.diff","patch_url":"https://github.com/akka/reactive-kafka/pull/491.patch","issue_url":"https://api.github.com/repos/akka/reactive-kafka/issues/491","number":491,"state":"open","locked":false,"title":"Expose metadata retrieving functions of Consumer in KafkaConsumerActor","user":{"login":"ennru","id":458526,"node_id":"MDQ6VXNlcjQ1ODUyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/458526?v=4","gravatar_id":"","url":"https://api.github.com/users/ennru","html_url":"https://github.com/ennru","followers_url":"https://api.github.com/users/ennru/followers","following_url":"https://api.github.com/users/ennru/following{/other_user}","gists_url":"https://api.github.com/users/ennru/gists{/gist_id}","starred_url":"https://api.github.com/users/ennru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ennru/subscriptions","organizations_url":"https://api.github.com/users/ennru/orgs","repos_url":"https://api.github.com/users/ennru/repos","events_url":"https://api.github.com/users/ennru/events{/privacy}","received_events_url":"https://api.github.com/users/ennru/received_events","type":"User","site_admin":false},"body":"Rebased #430 as we moved the KafkaConsumerActor implementation into internal.","created_at":"2018-05-31T07:53:05Z","updated_at":"2018-05-31T13:02:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c7a32cf7c95a1f7b03fcd3c6c112960288962df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/akka/reactive-kafka/pulls/491/commits","review_comments_url":"https://api.github.com/repos/akka/reactive-kafka/pulls/491/comments","review_comment_url":"https://api.github.com/repos/akka/reactive-kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/reactive-kafka/issues/491/comments","statuses_url":"https://api.github.com/repos/akka/reactive-kafka/statuses/fa2b82795b6603916738f55e3109cdcd87901ca7","head":{"label":"ennru:dsitte-h_metadata","ref":"dsitte-h_metadata","sha":"fa2b82795b6603916738f55e3109cdcd87901ca7","user":{"login":"ennru","id":458526,"node_id":"MDQ6VXNlcjQ1ODUyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/458526?v=4","gravatar_id":"","url":"https://api.github.com/users/ennru","html_url":"https://github.com/ennru","followers_url":"https://api.github.com/users/ennru/followers","following_url":"https://api.github.com/users/ennru/following{/other_user}","gists_url":"https://api.github.com/users/ennru/gists{/gist_id}","starred_url":"https://api.github.com/users/ennru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ennru/subscriptions","organizations_url":"https://api.github.com/users/ennru/orgs","repos_url":"https://api.github.com/users/ennru/repos","events_url":"https://api.github.com/users/ennru/events{/privacy}","received_events_url":"https://api.github.com/users/ennru/received_events","type":"User","site_admin":false},"repo":{"id":85834234,"node_id":"MDEwOlJlcG9zaXRvcnk4NTgzNDIzNA==","name":"reactive-kafka","full_name":"ennru/reactive-kafka","owner":{"login":"ennru","id":458526,"node_id":"MDQ6VXNlcjQ1ODUyNg==","avatar_url":"https://avatars3.githubusercontent.com/u/458526?v=4","gravatar_id":"","url":"https://api.github.com/users/ennru","html_url":"https://github.com/ennru","followers_url":"https://api.github.com/users/ennru/followers","following_url":"https://api.github.com/users/ennru/following{/other_user}","gists_url":"https://api.github.com/users/ennru/gists{/gist_id}","starred_url":"https://api.github.com/users/ennru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ennru/subscriptions","organizations_url":"https://api.github.com/users/ennru/orgs","repos_url":"https://api.github.com/users/ennru/repos","events_url":"https://api.github.com/users/ennru/events{/privacy}","received_events_url":"https://api.github.com/users/ennru/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ennru/reactive-kafka","description":"Reactive Streams API for Apache Kafka","fork":true,"url":"https://api.github.com/repos/ennru/reactive-kafka","forks_url":"https://api.github.com/repos/ennru/reactive-kafka/forks","keys_url":"https://api.github.com/repos/ennru/reactive-kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ennru/reactive-kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ennru/reactive-kafka/teams","hooks_url":"https://api.github.com/repos/ennru/reactive-kafka/hooks","issue_events_url":"https://api.github.com/repos/ennru/reactive-kafka/issues/events{/number}","events_url":"https://api.github.com/repos/ennru/reactive-kafka/events","assignees_url":"https://api.github.com/repos/ennru/reactive-kafka/assignees{/user}","branches_url":"https://api.github.com/repos/ennru/reactive-kafka/branches{/branch}","tags_url":"https://api.github.com/repos/ennru/reactive-kafka/tags","blobs_url":"https://api.github.com/repos/ennru/reactive-kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ennru/reactive-kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ennru/reactive-kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/ennru/reactive-kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ennru/reactive-kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/ennru/reactive-kafka/languages","stargazers_url":"https://api.github.com/repos/ennru/reactive-kafka/stargazers","contributors_url":"https://api.github.com/repos/ennru/reactive-kafka/contributors","subscribers_url":"https://api.github.com/repos/ennru/reactive-kafka/subscribers","subscription_url":"https://api.github.com/repos/ennru/reactive-kafka/subscription","commits_url":"https://api.github.com/repos/ennru/reactive-kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/ennru/reactive-kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/ennru/reactive-kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/ennru/reactive-kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/ennru/reactive-kafka/contents/{+path}","compare_url":"https://api.github.com/repos/ennru/reactive-kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ennru/reactive-kafka/merges","archive_url":"https://api.github.com/repos/ennru/reactive-kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ennru/reactive-kafka/downloads","issues_url":"https://api.github.com/repos/ennru/reactive-kafka/issues{/number}","pulls_url":"https://api.github.com/repos/ennru/reactive-kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/ennru/reactive-kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/ennru/reactive-kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ennru/reactive-kafka/labels{/name}","releases_url":"https://api.github.com/repos/ennru/reactive-kafka/releases{/id}","deployments_url":"https://api.github.com/repos/ennru/reactive-kafka/deployments","created_at":"2017-03-22T13:59:07Z","updated_at":"2017-03-22T13:59:08Z","pushed_at":"2018-05-31T12:37:34Z","git_url":"git://github.com/ennru/reactive-kafka.git","ssh_url":"git@github.com:ennru/reactive-kafka.git","clone_url":"https://github.com/ennru/reactive-kafka.git","svn_url":"https://github.com/ennru/reactive-kafka","homepage":null,"size":1404,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"4170e8ca99918069d060495ab5733420cc5ef256","user":{"login":"akka","id":1496237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTYyMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","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":28635588,"node_id":"MDEwOlJlcG9zaXRvcnkyODYzNTU4OA==","name":"reactive-kafka","full_name":"akka/reactive-kafka","owner":{"login":"akka","id":1496237,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0OTYyMzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","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/reactive-kafka","description":"Reactive Streams API for Apache Kafka","fork":false,"url":"https://api.github.com/repos/akka/reactive-kafka","forks_url":"https://api.github.com/repos/akka/reactive-kafka/forks","keys_url":"https://api.github.com/repos/akka/reactive-kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/reactive-kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/reactive-kafka/teams","hooks_url":"https://api.github.com/repos/akka/reactive-kafka/hooks","issue_events_url":"https://api.github.com/repos/akka/reactive-kafka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/reactive-kafka/events","assignees_url":"https://api.github.com/repos/akka/reactive-kafka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/reactive-kafka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/reactive-kafka/tags","blobs_url":"https://api.github.com/repos/akka/reactive-kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/reactive-kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/reactive-kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/reactive-kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/reactive-kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/reactive-kafka/languages","stargazers_url":"https://api.github.com/repos/akka/reactive-kafka/stargazers","contributors_url":"https://api.github.com/repos/akka/reactive-kafka/contributors","subscribers_url":"https://api.github.com/repos/akka/reactive-kafka/subscribers","subscription_url":"https://api.github.com/repos/akka/reactive-kafka/subscription","commits_url":"https://api.github.com/repos/akka/reactive-kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/reactive-kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/reactive-kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/reactive-kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/reactive-kafka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/reactive-kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/reactive-kafka/merges","archive_url":"https://api.github.com/repos/akka/reactive-kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/reactive-kafka/downloads","issues_url":"https://api.github.com/repos/akka/reactive-kafka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/reactive-kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/reactive-kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/reactive-kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/reactive-kafka/labels{/name}","releases_url":"https://api.github.com/repos/akka/reactive-kafka/releases{/id}","deployments_url":"https://api.github.com/repos/akka/reactive-kafka/deployments","created_at":"2014-12-30T15:30:02Z","updated_at":"2018-05-31T12:34:05Z","pushed_at":"2018-05-31T12:37:36Z","git_url":"git://github.com/akka/reactive-kafka.git","ssh_url":"git@github.com:akka/reactive-kafka.git","clone_url":"https://github.com/akka/reactive-kafka.git","svn_url":"https://github.com/akka/reactive-kafka","homepage":"http://doc.akka.io/docs/akka-stream-kafka/current/home.html","size":1340,"stargazers_count":1018,"watchers_count":1018,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":280,"mirror_url":null,"archived":false,"open_issues_count":68,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":280,"open_issues":68,"watchers":1018,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/reactive-kafka/pulls/491"},"html":{"href":"https://github.com/akka/reactive-kafka/pull/491"},"issue":{"href":"https://api.github.com/repos/akka/reactive-kafka/issues/491"},"comments":{"href":"https://api.github.com/repos/akka/reactive-kafka/issues/491/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/reactive-kafka/pulls/491/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/reactive-kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/reactive-kafka/pulls/491/commits"},"statuses":{"href":"https://api.github.com/repos/akka/reactive-kafka/statuses/fa2b82795b6603916738f55e3109cdcd87901ca7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"2m"}}