{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/195617116","pull_request_review_id":129023194,"id":195617116,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTYxNzExNg==","diff_hunk":"@@ -310,6 +312,40 @@ <h4><a class=\"toc-backref\" href=\"#id5\">bootstrap.servers</a><a class=\"headerlink\n                 <li><a class=\"reference external\" href=\"../../../javadoc/org/apache/kafka/streams/errors/LogAndFailExceptionHandler.html\">LogAndFailExceptionHandler</a>.\n                   This handler logs the deserialization exception and then signals the processing pipeline to stop processing more records.</li>\n               </ul>\n+\n+              <p>You can also provide your own customized exception handler besides the library provided ones to meet your needs. For example, you can choose to forward corrupt\n+                records into a quarantine topic (think: a “dead letter queue”) for further processing. To do this, use the Producer API to write a corrupted record directly to\n+                the quarantine topic. The drawback of this approach is that “manual” writes are side effects that are invisible to the Kafka Streams runtime library,\n+                so they do not benefit from the end-to-end processing guarantees of the Streams API:</p>\n+\n+              <pre class=\"brush: java;\">\n+              class SendToDeadLetterQueueExceptionHandler implements DeserializationExceptionHandler {\n+                  KafkaProducer&lt;byte[], byte[]&gt; dlqProducer;\n+                  String dlqTopic;\n+\n+                  @Override\n+                  public DeserializationHandlerResponse handle(final ProcessorContext context,\n+                                                               final ConsumerRecord&lt;byte[], byte[]&gt; record,\n+                                                               final Exception exception) {\n+\n+                      log.warn(\"Exception caught during Deserialization, sending to the dead queue topic; \" +\n+                          \"taskId: {}, topic: {}, partition: {}, offset: {}\",\n+                          context.taskId(), record.topic(), record.partition(), record.offset(),\n+                          exception);\n+\n+                      dlqProducer.send(new ProducerRecord&lt;&gt;(dlqTopic, record.timestamp(), record.key(), record.value()));\n+\n+                      return DeserializationHandlerResponse.CONTINUE;\n+                  }\n+\n+                  @Override\n+                  public void configure(final Map&lt;String, ?&gt; configs) {\n+                      dlqProducer = .. // get a producer from the configs map","path":"docs/streams/developer-guide/config-streams.html","position":45,"original_position":45,"commit_id":"0cb6f2dc8900d120463b1eb7a40707bbd0964272","original_commit_id":"0cb6f2dc8900d120463b1eb7a40707bbd0964272","user":{"login":"guozhangwang","id":10729597,"node_id":"MDQ6VXNlcjEwNzI5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"body":"The intent is that users can pass in a producer object via the map. But thinking about it twice, I agree with you that `creating a producer with the passed in configuration` sounds better.","created_at":"2018-06-15T01:52:44Z","updated_at":"2018-06-15T01:52:44Z","html_url":"https://github.com/apache/kafka/pull/5231#discussion_r195617116","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/5231","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/195617116"},"html":{"href":"https://github.com/apache/kafka/pull/5231#discussion_r195617116"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/5231"}},"in_reply_to_id":195598191},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/5231","id":195012138,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDEyMTM4","html_url":"https://github.com/apache/kafka/pull/5231","diff_url":"https://github.com/apache/kafka/pull/5231.diff","patch_url":"https://github.com/apache/kafka/pull/5231.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/5231","number":5231,"state":"open","locked":false,"title":"MINOR: provide an example for deserialization exception handler","user":{"login":"guozhangwang","id":10729597,"node_id":"MDQ6VXNlcjEwNzI5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"body":"Also added a paragraph from data types to link to the example code.\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-06-14T20:42:47Z","updated_at":"2018-06-15T01:52:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc488830e97022febc092bd98dfeede7aaacca5b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":820747028,"node_id":"MDU6TGFiZWw4MjA3NDcwMjg=","url":"https://api.github.com/repos/apache/kafka/labels/streams","name":"streams","color":"63edea","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/5231/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/5231/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/5231/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/0cb6f2dc8900d120463b1eb7a40707bbd0964272","head":{"label":"guozhangwang:KMinor-deserialization-handler-docs","ref":"KMinor-deserialization-handler-docs","sha":"0cb6f2dc8900d120463b1eb7a40707bbd0964272","user":{"login":"guozhangwang","id":10729597,"node_id":"MDQ6VXNlcjEwNzI5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"repo":{"id":39164613,"node_id":"MDEwOlJlcG9zaXRvcnkzOTE2NDYxMw==","name":"kafka","full_name":"guozhangwang/kafka","owner":{"login":"guozhangwang","id":10729597,"node_id":"MDQ6VXNlcjEwNzI5NTk3","avatar_url":"https://avatars0.githubusercontent.com/u/10729597?v=4","gravatar_id":"","url":"https://api.github.com/users/guozhangwang","html_url":"https://github.com/guozhangwang","followers_url":"https://api.github.com/users/guozhangwang/followers","following_url":"https://api.github.com/users/guozhangwang/following{/other_user}","gists_url":"https://api.github.com/users/guozhangwang/gists{/gist_id}","starred_url":"https://api.github.com/users/guozhangwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guozhangwang/subscriptions","organizations_url":"https://api.github.com/users/guozhangwang/orgs","repos_url":"https://api.github.com/users/guozhangwang/repos","events_url":"https://api.github.com/users/guozhangwang/events{/privacy}","received_events_url":"https://api.github.com/users/guozhangwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guozhangwang/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/guozhangwang/kafka","forks_url":"https://api.github.com/repos/guozhangwang/kafka/forks","keys_url":"https://api.github.com/repos/guozhangwang/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guozhangwang/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guozhangwang/kafka/teams","hooks_url":"https://api.github.com/repos/guozhangwang/kafka/hooks","issue_events_url":"https://api.github.com/repos/guozhangwang/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/guozhangwang/kafka/events","assignees_url":"https://api.github.com/repos/guozhangwang/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/guozhangwang/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/guozhangwang/kafka/tags","blobs_url":"https://api.github.com/repos/guozhangwang/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guozhangwang/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guozhangwang/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/guozhangwang/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guozhangwang/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/guozhangwang/kafka/languages","stargazers_url":"https://api.github.com/repos/guozhangwang/kafka/stargazers","contributors_url":"https://api.github.com/repos/guozhangwang/kafka/contributors","subscribers_url":"https://api.github.com/repos/guozhangwang/kafka/subscribers","subscription_url":"https://api.github.com/repos/guozhangwang/kafka/subscription","commits_url":"https://api.github.com/repos/guozhangwang/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/guozhangwang/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/guozhangwang/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/guozhangwang/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/guozhangwang/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/guozhangwang/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guozhangwang/kafka/merges","archive_url":"https://api.github.com/repos/guozhangwang/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guozhangwang/kafka/downloads","issues_url":"https://api.github.com/repos/guozhangwang/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/guozhangwang/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/guozhangwang/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/guozhangwang/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guozhangwang/kafka/labels{/name}","releases_url":"https://api.github.com/repos/guozhangwang/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/guozhangwang/kafka/deployments","created_at":"2015-07-15T22:40:38Z","updated_at":"2018-06-12T01:04:56Z","pushed_at":"2018-06-15T00:38:54Z","git_url":"git://github.com/guozhangwang/kafka.git","ssh_url":"git@github.com:guozhangwang/kafka.git","clone_url":"https://github.com/guozhangwang/kafka.git","svn_url":"https://github.com/guozhangwang/kafka","homepage":null,"size":68076,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":1,"watchers":1,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"fa993fbaa00e994feb2c02b47fc646953b42d824","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"node_id":"MDEwOlJlcG9zaXRvcnkyMjExMjQz","name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2018-06-15T01:47:18Z","pushed_at":"2018-06-15T00:38:58Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":67924,"stargazers_count":8642,"watchers_count":8642,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4995,"mirror_url":null,"archived":false,"open_issues_count":462,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4995,"open_issues":462,"watchers":8642,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/5231"},"html":{"href":"https://github.com/apache/kafka/pull/5231"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/5231"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/5231/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/5231/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/5231/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/0cb6f2dc8900d120463b1eb7a40707bbd0964272"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"guozhangwang"}}