{"action":"created","comment":{"url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/comments/114767431","pull_request_review_id":36261604,"id":114767431,"diff_hunk":"@@ -0,0 +1,5 @@\n+package org.zalando.nakadiproducer.transmission;\n+\n+public interface EventTransmitter {","path":"src/main/java/org/zalando/nakadiproducer/transmission/EventTransmitter.java","position":3,"original_position":3,"commit_id":"c1b6f3b1c3dc32b75d6bab1cf44d384f93ef66c8","original_commit_id":"afde1422302d71526142dc135e30dd0865ba46f4","user":{"login":"BGehrels","id":1008320,"avatar_url":"https://avatars3.githubusercontent.com/u/1008320?v=3","gravatar_id":"","url":"https://api.github.com/users/BGehrels","html_url":"https://github.com/BGehrels","followers_url":"https://api.github.com/users/BGehrels/followers","following_url":"https://api.github.com/users/BGehrels/following{/other_user}","gists_url":"https://api.github.com/users/BGehrels/gists{/gist_id}","starred_url":"https://api.github.com/users/BGehrels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BGehrels/subscriptions","organizations_url":"https://api.github.com/users/BGehrels/orgs","repos_url":"https://api.github.com/users/BGehrels/repos","events_url":"https://api.github.com/users/BGehrels/events{/privacy}","received_events_url":"https://api.github.com/users/BGehrels/received_events","type":"User","site_admin":false},"body":"The idea was that clients can implement their own scheduling logic instead of relying on the relatively dumb one we provide. But maybe you are right lets remove it as long as there is no real use case","created_at":"2017-05-04T13:06:25Z","updated_at":"2017-05-04T13:06:25Z","html_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter/pull/2#discussion_r114767431","pull_request_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/comments/114767431"},"html":{"href":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter/pull/2#discussion_r114767431"},"pull_request":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2","id":118816899,"html_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter/pull/2","diff_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter/pull/2.diff","patch_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter/pull/2.patch","issue_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/2","number":2,"state":"open","locked":false,"title":"LBJ-208 fork tarbela producer starter lib and rework it, so that it sends directly to nakadi","user":{"login":"BGehrels","id":1008320,"avatar_url":"https://avatars3.githubusercontent.com/u/1008320?v=3","gravatar_id":"","url":"https://api.github.com/users/BGehrels","html_url":"https://github.com/BGehrels","followers_url":"https://api.github.com/users/BGehrels/followers","following_url":"https://api.github.com/users/BGehrels/following{/other_user}","gists_url":"https://api.github.com/users/BGehrels/gists{/gist_id}","starred_url":"https://api.github.com/users/BGehrels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BGehrels/subscriptions","organizations_url":"https://api.github.com/users/BGehrels/orgs","repos_url":"https://api.github.com/users/BGehrels/repos","events_url":"https://api.github.com/users/BGehrels/events{/privacy}","received_events_url":"https://api.github.com/users/BGehrels/received_events","type":"User","site_admin":false},"body":"After forking the sourcecode of the tarbela-producer-spring-boot-starter, this PR reworks it to not rely on tarbela anymore. Instead of implementing tarbelas Http producer API, it uses the fahrschein library to directly publish the events to nakadi.\r\n\r\nThe basic strategy is:\r\n- Wait for a second (configurable)\r\n- generate a unique execution id\r\n- lock all unpublished events for 10 minutes, exclusively for this execution\r\n- sequentially publish one after another\r\n- delete those that were successfully sent from the local log\r\n- continue from the beginning.\r\n\r\nThis leads to an automated retry for failed events every 10 minutes.\r\n\r\nSnapshot creation is moved from a controller into a spring boot actuator endpoint. This way it will automatically inherit the spring actuator security & port & namespace config.\r\n\r\nThe former GET endpoints were removed to keep the change set small. They can be readded in a seperate PR when needed.\r\n\r\nYes, we now delete messages that were sent. This may make debugging of event flows, that are older than nakadis retention period for the given topic harder. But since nakadi stores messages for some days, i think this is acceptable to keep this PR short and to ease operations (no endlessly growing storage volume). We can add an optional `keep-old-events` property later if needed.\r\n\r\nWith this PR, i changed the package structure from a layered (persistence, service, web) to a semantic (eventlog, snapshots, transmission) one. Yes, this makes git diff useless, but since the old code barely has much to do with the new one, i would not suggest using git diff here anyway.\r\n\r\nI changed the flyway paths, all package names and the http paths so that none of them conflicts with the existing tarbela-producer-spring-boot-starter. This way both can be present on the classpath as a migration strategy.\r\n\r\n","created_at":"2017-05-03T17:46:04Z","updated_at":"2017-05-04T13:06:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76b0bf267a1bdd0a49ff386d0a50ffd64e8ab2c6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2/commits","review_comments_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2/comments","review_comment_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/2/comments","statuses_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/statuses/c1b6f3b1c3dc32b75d6bab1cf44d384f93ef66c8","head":{"label":"zalando-incubator:LBJ-208","ref":"LBJ-208","sha":"c1b6f3b1c3dc32b75d6bab1cf44d384f93ef66c8","user":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":90135592,"name":"nakadi-producer-spring-boot-starter","full_name":"zalando-incubator/nakadi-producer-spring-boot-starter","owner":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter","description":"Nakadi event producer as a Spring boot starter","fork":false,"url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter","forks_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/forks","keys_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/teams","hooks_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/hooks","issue_events_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/events","assignees_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/tags","blobs_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/languages","stargazers_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/stargazers","contributors_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/contributors","subscribers_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/subscribers","subscription_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/subscription","commits_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/merges","archive_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/downloads","issues_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/labels{/name}","releases_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/releases{/id}","deployments_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/deployments","created_at":"2017-05-03T10:09:49Z","updated_at":"2017-05-03T11:42:59Z","pushed_at":"2017-05-04T12:46:07Z","git_url":"git://github.com/zalando-incubator/nakadi-producer-spring-boot-starter.git","ssh_url":"git@github.com:zalando-incubator/nakadi-producer-spring-boot-starter.git","clone_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter.git","svn_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter","homepage":"","size":233,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"zalando-incubator:master","ref":"master","sha":"c3f7e2487dacd97ed05344a6a5f363882d5e0991","user":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":90135592,"name":"nakadi-producer-spring-boot-starter","full_name":"zalando-incubator/nakadi-producer-spring-boot-starter","owner":{"login":"zalando-incubator","id":18533786,"avatar_url":"https://avatars0.githubusercontent.com/u/18533786?v=3","gravatar_id":"","url":"https://api.github.com/users/zalando-incubator","html_url":"https://github.com/zalando-incubator","followers_url":"https://api.github.com/users/zalando-incubator/followers","following_url":"https://api.github.com/users/zalando-incubator/following{/other_user}","gists_url":"https://api.github.com/users/zalando-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/zalando-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalando-incubator/subscriptions","organizations_url":"https://api.github.com/users/zalando-incubator/orgs","repos_url":"https://api.github.com/users/zalando-incubator/repos","events_url":"https://api.github.com/users/zalando-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/zalando-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter","description":"Nakadi event producer as a Spring boot starter","fork":false,"url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter","forks_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/forks","keys_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/teams","hooks_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/hooks","issue_events_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/events{/number}","events_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/events","assignees_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/assignees{/user}","branches_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/branches{/branch}","tags_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/tags","blobs_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/refs{/sha}","trees_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/statuses/{sha}","languages_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/languages","stargazers_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/stargazers","contributors_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/contributors","subscribers_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/subscribers","subscription_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/subscription","commits_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/commits{/sha}","git_commits_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/git/commits{/sha}","comments_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/comments{/number}","issue_comment_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/comments{/number}","contents_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/contents/{+path}","compare_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/merges","archive_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/downloads","issues_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues{/number}","pulls_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls{/number}","milestones_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/milestones{/number}","notifications_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/labels{/name}","releases_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/releases{/id}","deployments_url":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/deployments","created_at":"2017-05-03T10:09:49Z","updated_at":"2017-05-03T11:42:59Z","pushed_at":"2017-05-04T12:46:07Z","git_url":"git://github.com/zalando-incubator/nakadi-producer-spring-boot-starter.git","ssh_url":"git@github.com:zalando-incubator/nakadi-producer-spring-boot-starter.git","clone_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter.git","svn_url":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter","homepage":"","size":233,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2"},"html":{"href":"https://github.com/zalando-incubator/nakadi-producer-spring-boot-starter/pull/2"},"issue":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/2"},"comments":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/zalando-incubator/nakadi-producer-spring-boot-starter/statuses/c1b6f3b1c3dc32b75d6bab1cf44d384f93ef66c8"}}}}
{"actor":{"display_login":"BGehrels"}}