{"action":"created","comment":{"url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/comments/57885970","id":57885970,"diff_hunk":"@@ -13,9 +13,14 @@ services:\n         public: false\n         arguments:\n             - '@simple_bus.asynchronous.event_publisher'\n-        tags:\n-            # insert before the middleware that actually notifies a message subscriber of the message\n-            - { name: event_bus_middleware, priority: 0 }\n+\n+    simple_bus.asynchronous.published_predefined_messages_middleware:","path":"src/Resources/config/asynchronous_events.yml","position":8,"original_position":8,"commit_id":"35f41641bac12c474e44c1c35fda4d42a11efb37","original_commit_id":"35f41641bac12c474e44c1c35fda4d42a11efb37","user":{"login":"ruudk","id":104180,"avatar_url":"https://avatars.githubusercontent.com/u/104180?v=3","gravatar_id":"","url":"https://api.github.com/users/ruudk","html_url":"https://github.com/ruudk","followers_url":"https://api.github.com/users/ruudk/followers","following_url":"https://api.github.com/users/ruudk/following{/other_user}","gists_url":"https://api.github.com/users/ruudk/gists{/gist_id}","starred_url":"https://api.github.com/users/ruudk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruudk/subscriptions","organizations_url":"https://api.github.com/users/ruudk/orgs","repos_url":"https://api.github.com/users/ruudk/repos","events_url":"https://api.github.com/users/ruudk/events{/privacy}","received_events_url":"https://api.github.com/users/ruudk/received_events","type":"User","site_admin":false},"body":"Should be `publishes` instead of `published`","created_at":"2016-03-30T13:18:32Z","updated_at":"2016-03-30T13:18:32Z","html_url":"https://github.com/SimpleBus/AsynchronousBundle/pull/6#discussion_r57885970","pull_request_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/comments/57885970"},"html":{"href":"https://github.com/SimpleBus/AsynchronousBundle/pull/6#discussion_r57885970"},"pull_request":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6","id":64623107,"html_url":"https://github.com/SimpleBus/AsynchronousBundle/pull/6","diff_url":"https://github.com/SimpleBus/AsynchronousBundle/pull/6.diff","patch_url":"https://github.com/SimpleBus/AsynchronousBundle/pull/6.patch","issue_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues/6","number":6,"state":"open","locked":false,"title":"Added option to change strategy for publishing events","user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"body":"We are currently pushing all events on the message queue. If you got the following scenario: \r\n* Same application producing and consuming messages\r\n* You have a lot of events fired \r\n* Only a few asynchronous events\r\n... you will have a big overhead on your server. The background process starts the application to find out that there is nothing to do with the event. \r\n\r\nThis PR makes sure that we only publish events that got an async subscriber. This feature is implemented as an opt-in feature. \r\n\r\n```yaml\r\nsimple_bus_asynchronous:\r\n  events:\r\n    strategy: 'predefined' # default: 'always'\r\n```\r\n\r\nIf this is a feature that you like Im happy to finish this PR with tests and docs. \r\n\r\n### TODO\r\n* [ ] Add tests\r\n* [ ] Add docs\r\n\r\n\r\n### Related\r\nRelated to: https://github.com/SimpleBus/Asynchronous/pull/7","created_at":"2016-03-30T13:02:02Z","updated_at":"2016-03-30T13:18:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"606d40ab246376adc319f2965576afe6c849eed8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6/commits","review_comments_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6/comments","review_comment_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues/6/comments","statuses_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/statuses/35f41641bac12c474e44c1c35fda4d42a11efb37","head":{"label":"Nyholm:predefined","ref":"predefined","sha":"35f41641bac12c474e44c1c35fda4d42a11efb37","user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"repo":{"id":55062416,"name":"AsynchronousBundle","full_name":"Nyholm/AsynchronousBundle","owner":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nyholm/AsynchronousBundle","description":"Symfony bundle for using SimpleBus/Asynchronous","fork":true,"url":"https://api.github.com/repos/Nyholm/AsynchronousBundle","forks_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/forks","keys_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/teams","hooks_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/hooks","issue_events_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/issues/events{/number}","events_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/events","assignees_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/assignees{/user}","branches_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/branches{/branch}","tags_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/tags","blobs_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/languages","stargazers_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/stargazers","contributors_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/contributors","subscribers_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/subscribers","subscription_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/subscription","commits_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/contents/{+path}","compare_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/merges","archive_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/downloads","issues_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/issues{/number}","pulls_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/labels{/name}","releases_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/releases{/id}","deployments_url":"https://api.github.com/repos/Nyholm/AsynchronousBundle/deployments","created_at":"2016-03-30T12:48:27Z","updated_at":"2016-03-30T12:48:28Z","pushed_at":"2016-03-30T12:53:34Z","git_url":"git://github.com/Nyholm/AsynchronousBundle.git","ssh_url":"git@github.com:Nyholm/AsynchronousBundle.git","clone_url":"https://github.com/Nyholm/AsynchronousBundle.git","svn_url":"https://github.com/Nyholm/AsynchronousBundle","homepage":null,"size":563,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"SimpleBus:master","ref":"master","sha":"b3337e5adafd85ae479974d0a06cacfdbbc29675","user":{"login":"SimpleBus","id":9606451,"avatar_url":"https://avatars.githubusercontent.com/u/9606451?v=3","gravatar_id":"","url":"https://api.github.com/users/SimpleBus","html_url":"https://github.com/SimpleBus","followers_url":"https://api.github.com/users/SimpleBus/followers","following_url":"https://api.github.com/users/SimpleBus/following{/other_user}","gists_url":"https://api.github.com/users/SimpleBus/gists{/gist_id}","starred_url":"https://api.github.com/users/SimpleBus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimpleBus/subscriptions","organizations_url":"https://api.github.com/users/SimpleBus/orgs","repos_url":"https://api.github.com/users/SimpleBus/repos","events_url":"https://api.github.com/users/SimpleBus/events{/privacy}","received_events_url":"https://api.github.com/users/SimpleBus/received_events","type":"Organization","site_admin":false},"repo":{"id":31500674,"name":"AsynchronousBundle","full_name":"SimpleBus/AsynchronousBundle","owner":{"login":"SimpleBus","id":9606451,"avatar_url":"https://avatars.githubusercontent.com/u/9606451?v=3","gravatar_id":"","url":"https://api.github.com/users/SimpleBus","html_url":"https://github.com/SimpleBus","followers_url":"https://api.github.com/users/SimpleBus/followers","following_url":"https://api.github.com/users/SimpleBus/following{/other_user}","gists_url":"https://api.github.com/users/SimpleBus/gists{/gist_id}","starred_url":"https://api.github.com/users/SimpleBus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimpleBus/subscriptions","organizations_url":"https://api.github.com/users/SimpleBus/orgs","repos_url":"https://api.github.com/users/SimpleBus/repos","events_url":"https://api.github.com/users/SimpleBus/events{/privacy}","received_events_url":"https://api.github.com/users/SimpleBus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SimpleBus/AsynchronousBundle","description":"Symfony bundle for using SimpleBus/Asynchronous","fork":false,"url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle","forks_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/forks","keys_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/teams","hooks_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/hooks","issue_events_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues/events{/number}","events_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/events","assignees_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/assignees{/user}","branches_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/branches{/branch}","tags_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/tags","blobs_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/languages","stargazers_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/stargazers","contributors_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/contributors","subscribers_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/subscribers","subscription_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/subscription","commits_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/contents/{+path}","compare_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/merges","archive_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/downloads","issues_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues{/number}","pulls_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/labels{/name}","releases_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/releases{/id}","deployments_url":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/deployments","created_at":"2015-03-01T15:31:58Z","updated_at":"2015-12-09T00:57:36Z","pushed_at":"2016-03-30T13:02:03Z","git_url":"git://github.com/SimpleBus/AsynchronousBundle.git","ssh_url":"git@github.com:SimpleBus/AsynchronousBundle.git","clone_url":"https://github.com/SimpleBus/AsynchronousBundle.git","svn_url":"https://github.com/SimpleBus/AsynchronousBundle","homepage":null,"size":574,"stargazers_count":11,"watchers_count":11,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6"},"html":{"href":"https://github.com/SimpleBus/AsynchronousBundle/pull/6"},"issue":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues/6"},"comments":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/SimpleBus/AsynchronousBundle/statuses/35f41641bac12c474e44c1c35fda4d42a11efb37"}}}}