{"action":"created","comment":{"url":"https://api.github.com/repos/edenhill/librdkafka/pulls/comments/212939990","pull_request_review_id":149667841,"id":212939990,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjkzOTk5MA==","diff_hunk":"@@ -1365,7 +1366,139 @@ class RD_EXPORT MessageTimestamp {\n   int64_t timestamp;               /**< Milliseconds since epoch (UTC). */\n };\n \n+/**\n+ * @brief Headers object\n+ *\n+ * This object encapsulates the C implementation logic into a C++ object\n+ * for use in RdKafka::Messages object.\n+ */\n+class RD_EXPORT Headers {\n+ public:\n+  virtual ~Headers() = 0;\n+\n+  /**\n+   * @brief Header object\n+   *\n+   * This object represents a single Header with key value pair\n+   * and an ErrorCode\n+   *\n+   * @remark dynamic allocation of this object is not supported.\n+   *\n+   */\n+  class Header {\n+   public:\n+    Header(const std::string& key,\n+           const char* value,\n+           RdKafka::ErrorCode err = ERR_NO_ERROR):\n+    key_(key), err_(err) {\n+        value_container_.assign(value);\n+    };\n+    \n+    std::string key() const {\n+        return key_;\n+    }\n+\n+    const char* value() const {\n+        return value_container_.c_str();","path":"src-cpp/rdkafkacpp.h","position":58,"original_position":58,"commit_id":"fe84db6df49a59baf7fe4fcd2decd326f5af7f56","original_commit_id":"fe84db6df49a59baf7fe4fcd2decd326f5af7f56","user":{"login":"edenhill","id":524990,"node_id":"MDQ6VXNlcjUyNDk5MA==","avatar_url":"https://avatars0.githubusercontent.com/u/524990?v=4","gravatar_id":"","url":"https://api.github.com/users/edenhill","html_url":"https://github.com/edenhill","followers_url":"https://api.github.com/users/edenhill/followers","following_url":"https://api.github.com/users/edenhill/following{/other_user}","gists_url":"https://api.github.com/users/edenhill/gists{/gist_id}","starred_url":"https://api.github.com/users/edenhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenhill/subscriptions","organizations_url":"https://api.github.com/users/edenhill/orgs","repos_url":"https://api.github.com/users/edenhill/repos","events_url":"https://api.github.com/users/edenhill/events{/privacy}","received_events_url":"https://api.github.com/users/edenhill/received_events","type":"User","site_admin":false},"body":"values may be NULL","created_at":"2018-08-27T11:07:38Z","updated_at":"2018-08-27T11:33:13Z","html_url":"https://github.com/edenhill/librdkafka/pull/1959#discussion_r212939990","pull_request_url":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/edenhill/librdkafka/pulls/comments/212939990"},"html":{"href":"https://github.com/edenhill/librdkafka/pull/1959#discussion_r212939990"},"pull_request":{"href":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959"}}},"pull_request":{"url":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959","id":209584848,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NTg0ODQ4","html_url":"https://github.com/edenhill/librdkafka/pull/1959","diff_url":"https://github.com/edenhill/librdkafka/pull/1959.diff","patch_url":"https://github.com/edenhill/librdkafka/pull/1959.patch","issue_url":"https://api.github.com/repos/edenhill/librdkafka/issues/1959","number":1959,"state":"open","locked":false,"title":"Header support for C++ API","user":{"login":"davidtrihy","id":1636014,"node_id":"MDQ6VXNlcjE2MzYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1636014?v=4","gravatar_id":"","url":"https://api.github.com/users/davidtrihy","html_url":"https://github.com/davidtrihy","followers_url":"https://api.github.com/users/davidtrihy/followers","following_url":"https://api.github.com/users/davidtrihy/following{/other_user}","gists_url":"https://api.github.com/users/davidtrihy/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtrihy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtrihy/subscriptions","organizations_url":"https://api.github.com/users/davidtrihy/orgs","repos_url":"https://api.github.com/users/davidtrihy/repos","events_url":"https://api.github.com/users/davidtrihy/events{/privacy}","received_events_url":"https://api.github.com/users/davidtrihy/received_events","type":"User","site_admin":false},"body":"Producing and consuming header support in the C++ API.\r\n\r\nTwo test cases added in the e2e tests, was trying to add test cases for header support for empty/null messages but it appears that is not supported and the headers do not get attached. Is this correct behaviour?\r\n\r\nReference issue https://github.com/edenhill/librdkafka/issues/1861","created_at":"2018-08-20T17:03:46Z","updated_at":"2018-08-27T11:33:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8572e0a5596f3814de3cbc2adb528a588e72c5c3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959/commits","review_comments_url":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959/comments","review_comment_url":"https://api.github.com/repos/edenhill/librdkafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edenhill/librdkafka/issues/1959/comments","statuses_url":"https://api.github.com/repos/edenhill/librdkafka/statuses/fe84db6df49a59baf7fe4fcd2decd326f5af7f56","head":{"label":"davidtrihy:cpp_headers","ref":"cpp_headers","sha":"fe84db6df49a59baf7fe4fcd2decd326f5af7f56","user":{"login":"davidtrihy","id":1636014,"node_id":"MDQ6VXNlcjE2MzYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1636014?v=4","gravatar_id":"","url":"https://api.github.com/users/davidtrihy","html_url":"https://github.com/davidtrihy","followers_url":"https://api.github.com/users/davidtrihy/followers","following_url":"https://api.github.com/users/davidtrihy/following{/other_user}","gists_url":"https://api.github.com/users/davidtrihy/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtrihy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtrihy/subscriptions","organizations_url":"https://api.github.com/users/davidtrihy/orgs","repos_url":"https://api.github.com/users/davidtrihy/repos","events_url":"https://api.github.com/users/davidtrihy/events{/privacy}","received_events_url":"https://api.github.com/users/davidtrihy/received_events","type":"User","site_admin":false},"repo":{"id":144563364,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ1NjMzNjQ=","name":"librdkafka","full_name":"davidtrihy/librdkafka","owner":{"login":"davidtrihy","id":1636014,"node_id":"MDQ6VXNlcjE2MzYwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1636014?v=4","gravatar_id":"","url":"https://api.github.com/users/davidtrihy","html_url":"https://github.com/davidtrihy","followers_url":"https://api.github.com/users/davidtrihy/followers","following_url":"https://api.github.com/users/davidtrihy/following{/other_user}","gists_url":"https://api.github.com/users/davidtrihy/gists{/gist_id}","starred_url":"https://api.github.com/users/davidtrihy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidtrihy/subscriptions","organizations_url":"https://api.github.com/users/davidtrihy/orgs","repos_url":"https://api.github.com/users/davidtrihy/repos","events_url":"https://api.github.com/users/davidtrihy/events{/privacy}","received_events_url":"https://api.github.com/users/davidtrihy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidtrihy/librdkafka","description":"The Apache Kafka C/C++ library","fork":true,"url":"https://api.github.com/repos/davidtrihy/librdkafka","forks_url":"https://api.github.com/repos/davidtrihy/librdkafka/forks","keys_url":"https://api.github.com/repos/davidtrihy/librdkafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidtrihy/librdkafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidtrihy/librdkafka/teams","hooks_url":"https://api.github.com/repos/davidtrihy/librdkafka/hooks","issue_events_url":"https://api.github.com/repos/davidtrihy/librdkafka/issues/events{/number}","events_url":"https://api.github.com/repos/davidtrihy/librdkafka/events","assignees_url":"https://api.github.com/repos/davidtrihy/librdkafka/assignees{/user}","branches_url":"https://api.github.com/repos/davidtrihy/librdkafka/branches{/branch}","tags_url":"https://api.github.com/repos/davidtrihy/librdkafka/tags","blobs_url":"https://api.github.com/repos/davidtrihy/librdkafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidtrihy/librdkafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidtrihy/librdkafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidtrihy/librdkafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidtrihy/librdkafka/statuses/{sha}","languages_url":"https://api.github.com/repos/davidtrihy/librdkafka/languages","stargazers_url":"https://api.github.com/repos/davidtrihy/librdkafka/stargazers","contributors_url":"https://api.github.com/repos/davidtrihy/librdkafka/contributors","subscribers_url":"https://api.github.com/repos/davidtrihy/librdkafka/subscribers","subscription_url":"https://api.github.com/repos/davidtrihy/librdkafka/subscription","commits_url":"https://api.github.com/repos/davidtrihy/librdkafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidtrihy/librdkafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidtrihy/librdkafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidtrihy/librdkafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidtrihy/librdkafka/contents/{+path}","compare_url":"https://api.github.com/repos/davidtrihy/librdkafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidtrihy/librdkafka/merges","archive_url":"https://api.github.com/repos/davidtrihy/librdkafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidtrihy/librdkafka/downloads","issues_url":"https://api.github.com/repos/davidtrihy/librdkafka/issues{/number}","pulls_url":"https://api.github.com/repos/davidtrihy/librdkafka/pulls{/number}","milestones_url":"https://api.github.com/repos/davidtrihy/librdkafka/milestones{/number}","notifications_url":"https://api.github.com/repos/davidtrihy/librdkafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidtrihy/librdkafka/labels{/name}","releases_url":"https://api.github.com/repos/davidtrihy/librdkafka/releases{/id}","deployments_url":"https://api.github.com/repos/davidtrihy/librdkafka/deployments","created_at":"2018-08-13T10:17:22Z","updated_at":"2018-08-14T09:23:31Z","pushed_at":"2018-08-22T15:32:08Z","git_url":"git://github.com/davidtrihy/librdkafka.git","ssh_url":"git@github.com:davidtrihy/librdkafka.git","clone_url":"https://github.com/davidtrihy/librdkafka.git","svn_url":"https://github.com/davidtrihy/librdkafka","homepage":"","size":9878,"stargazers_count":0,"watchers_count":0,"language":"C","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":"edenhill:master","ref":"master","sha":"501fd3a70e800879b9712153caa9d262faef8c16","user":{"login":"edenhill","id":524990,"node_id":"MDQ6VXNlcjUyNDk5MA==","avatar_url":"https://avatars0.githubusercontent.com/u/524990?v=4","gravatar_id":"","url":"https://api.github.com/users/edenhill","html_url":"https://github.com/edenhill","followers_url":"https://api.github.com/users/edenhill/followers","following_url":"https://api.github.com/users/edenhill/following{/other_user}","gists_url":"https://api.github.com/users/edenhill/gists{/gist_id}","starred_url":"https://api.github.com/users/edenhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenhill/subscriptions","organizations_url":"https://api.github.com/users/edenhill/orgs","repos_url":"https://api.github.com/users/edenhill/repos","events_url":"https://api.github.com/users/edenhill/events{/privacy}","received_events_url":"https://api.github.com/users/edenhill/received_events","type":"User","site_admin":false},"repo":{"id":5870069,"node_id":"MDEwOlJlcG9zaXRvcnk1ODcwMDY5","name":"librdkafka","full_name":"edenhill/librdkafka","owner":{"login":"edenhill","id":524990,"node_id":"MDQ6VXNlcjUyNDk5MA==","avatar_url":"https://avatars0.githubusercontent.com/u/524990?v=4","gravatar_id":"","url":"https://api.github.com/users/edenhill","html_url":"https://github.com/edenhill","followers_url":"https://api.github.com/users/edenhill/followers","following_url":"https://api.github.com/users/edenhill/following{/other_user}","gists_url":"https://api.github.com/users/edenhill/gists{/gist_id}","starred_url":"https://api.github.com/users/edenhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenhill/subscriptions","organizations_url":"https://api.github.com/users/edenhill/orgs","repos_url":"https://api.github.com/users/edenhill/repos","events_url":"https://api.github.com/users/edenhill/events{/privacy}","received_events_url":"https://api.github.com/users/edenhill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edenhill/librdkafka","description":"The Apache Kafka C/C++ library","fork":false,"url":"https://api.github.com/repos/edenhill/librdkafka","forks_url":"https://api.github.com/repos/edenhill/librdkafka/forks","keys_url":"https://api.github.com/repos/edenhill/librdkafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edenhill/librdkafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edenhill/librdkafka/teams","hooks_url":"https://api.github.com/repos/edenhill/librdkafka/hooks","issue_events_url":"https://api.github.com/repos/edenhill/librdkafka/issues/events{/number}","events_url":"https://api.github.com/repos/edenhill/librdkafka/events","assignees_url":"https://api.github.com/repos/edenhill/librdkafka/assignees{/user}","branches_url":"https://api.github.com/repos/edenhill/librdkafka/branches{/branch}","tags_url":"https://api.github.com/repos/edenhill/librdkafka/tags","blobs_url":"https://api.github.com/repos/edenhill/librdkafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edenhill/librdkafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edenhill/librdkafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/edenhill/librdkafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edenhill/librdkafka/statuses/{sha}","languages_url":"https://api.github.com/repos/edenhill/librdkafka/languages","stargazers_url":"https://api.github.com/repos/edenhill/librdkafka/stargazers","contributors_url":"https://api.github.com/repos/edenhill/librdkafka/contributors","subscribers_url":"https://api.github.com/repos/edenhill/librdkafka/subscribers","subscription_url":"https://api.github.com/repos/edenhill/librdkafka/subscription","commits_url":"https://api.github.com/repos/edenhill/librdkafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/edenhill/librdkafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/edenhill/librdkafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/edenhill/librdkafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/edenhill/librdkafka/contents/{+path}","compare_url":"https://api.github.com/repos/edenhill/librdkafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edenhill/librdkafka/merges","archive_url":"https://api.github.com/repos/edenhill/librdkafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edenhill/librdkafka/downloads","issues_url":"https://api.github.com/repos/edenhill/librdkafka/issues{/number}","pulls_url":"https://api.github.com/repos/edenhill/librdkafka/pulls{/number}","milestones_url":"https://api.github.com/repos/edenhill/librdkafka/milestones{/number}","notifications_url":"https://api.github.com/repos/edenhill/librdkafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edenhill/librdkafka/labels{/name}","releases_url":"https://api.github.com/repos/edenhill/librdkafka/releases{/id}","deployments_url":"https://api.github.com/repos/edenhill/librdkafka/deployments","created_at":"2012-09-19T10:14:00Z","updated_at":"2018-08-27T11:10:23Z","pushed_at":"2018-08-27T09:03:22Z","git_url":"git://github.com/edenhill/librdkafka.git","ssh_url":"git@github.com:edenhill/librdkafka.git","clone_url":"https://github.com/edenhill/librdkafka.git","svn_url":"https://github.com/edenhill/librdkafka","homepage":"","size":9858,"stargazers_count":2181,"watchers_count":2181,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1060,"mirror_url":null,"archived":false,"open_issues_count":142,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1060,"open_issues":142,"watchers":2181,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959"},"html":{"href":"https://github.com/edenhill/librdkafka/pull/1959"},"issue":{"href":"https://api.github.com/repos/edenhill/librdkafka/issues/1959"},"comments":{"href":"https://api.github.com/repos/edenhill/librdkafka/issues/1959/comments"},"review_comments":{"href":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959/comments"},"review_comment":{"href":"https://api.github.com/repos/edenhill/librdkafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edenhill/librdkafka/pulls/1959/commits"},"statuses":{"href":"https://api.github.com/repos/edenhill/librdkafka/statuses/fe84db6df49a59baf7fe4fcd2decd326f5af7f56"}},"author_association":"NONE"}}
{"actor":{"display_login":"edenhill"}}