{"action":"created","comment":{"url":"https://api.github.com/repos/mulesoft/mule/pulls/comments/292425077","pull_request_review_id":248131626,"id":292425077,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MjQyNTA3Nw==","diff_hunk":"@@ -210,18 +216,53 @@ public CoreEvent process(CoreEvent event) throws MuleException {\n   private ReactiveProcessor dispatchToFlow() {\n     return publisher -> from(publisher)\n         .doOnNext(assertStarted())\n-        .flatMap(source.getBackPressureStrategy() == WAIT ? flowWaitMapper() : flowFailDropMapper());\n+        .flatMap(routeThroughProcessingStrategy());\n   }\n \n-  /**\n-   * If back-pressure strategy is WAIT then use blocking `accept(Event event)` to dispatch Event\n-   */\n-  protected abstract Function<? super CoreEvent, Mono<? extends CoreEvent>> flowWaitMapper();\n+  protected Function<CoreEvent, Publisher<? extends CoreEvent>> routeThroughProcessingStrategy() {\n+    return event -> {\n+      // Retrieve response publisher before error is communicated\n+      Publisher<CoreEvent> responsePublisher = ((BaseEventContext) event.getContext()).getResponsePublisher();\n+      try {\n+        // This accept/emit choice is made because there's a backpressure check done in the #emit sink message, which can be done\n+        // preemptively as the maxConcurrency one, before policies execution. As previous implementation, use WAIT strategy as\n+        // default\n+        if (getSource() == null || getSource().getBackPressureStrategy() == WAIT) {\n+          sink.accept(event);\n+        } else {\n+          if (!sink.emit(event)) {\n+            notifyBackpressureException(event, new FlowBackPressureException(this.getName()));\n+          }\n+        }\n+      } catch (RejectedExecutionException e) {\n+        // Wrap actual cause in a backpressure exception\n+        FlowBackPressureException wrappedException = new FlowBackPressureException(this.getName(), e);\n+        // Handle the case in which the event execution is rejected from the scheduler.","path":"core/src/main/java/org/mule/runtime/core/internal/construct/AbstractPipeline.java","position":87,"original_position":87,"commit_id":"7b2a3f0da027ab7752493715e0144cb16c8b62f6","original_commit_id":"7b2a3f0da027ab7752493715e0144cb16c8b62f6","user":{"login":"elrodro83","id":8010105,"node_id":"MDQ6VXNlcjgwMTAxMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/8010105?v=4","gravatar_id":"","url":"https://api.github.com/users/elrodro83","html_url":"https://github.com/elrodro83","followers_url":"https://api.github.com/users/elrodro83/followers","following_url":"https://api.github.com/users/elrodro83/following{/other_user}","gists_url":"https://api.github.com/users/elrodro83/gists{/gist_id}","starred_url":"https://api.github.com/users/elrodro83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elrodro83/subscriptions","organizations_url":"https://api.github.com/users/elrodro83/orgs","repos_url":"https://api.github.com/users/elrodro83/repos","events_url":"https://api.github.com/users/elrodro83/events{/privacy}","received_events_url":"https://api.github.com/users/elrodro83/received_events","type":"User","site_admin":false},"body":"i think this comment applies to the catch clause","created_at":"2019-06-11T12:22:02Z","updated_at":"2019-06-11T12:33:54Z","html_url":"https://github.com/mulesoft/mule/pull/7916#discussion_r292425077","pull_request_url":"https://api.github.com/repos/mulesoft/mule/pulls/7916","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/comments/292425077"},"html":{"href":"https://github.com/mulesoft/mule/pull/7916#discussion_r292425077"},"pull_request":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/7916"}}},"pull_request":{"url":"https://api.github.com/repos/mulesoft/mule/pulls/7916","id":282135106,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgyMTM1MTA2","html_url":"https://github.com/mulesoft/mule/pull/7916","diff_url":"https://github.com/mulesoft/mule/pull/7916.diff","patch_url":"https://github.com/mulesoft/mule/pull/7916.patch","issue_url":"https://api.github.com/repos/mulesoft/mule/issues/7916","number":7916,"state":"open","locked":false,"title":"MULE-16513: Perform flow backpressure check before source policies are applied","user":{"login":"plbalbi","id":2617411,"node_id":"MDQ6VXNlcjI2MTc0MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/2617411?v=4","gravatar_id":"","url":"https://api.github.com/users/plbalbi","html_url":"https://github.com/plbalbi","followers_url":"https://api.github.com/users/plbalbi/followers","following_url":"https://api.github.com/users/plbalbi/following{/other_user}","gists_url":"https://api.github.com/users/plbalbi/gists{/gist_id}","starred_url":"https://api.github.com/users/plbalbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plbalbi/subscriptions","organizations_url":"https://api.github.com/users/plbalbi/orgs","repos_url":"https://api.github.com/users/plbalbi/repos","events_url":"https://api.github.com/users/plbalbi/events{/privacy}","received_events_url":"https://api.github.com/users/plbalbi/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-05-24T19:31:15Z","updated_at":"2019-06-11T12:33:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfa842ea5be4243d884231ab124d2eb8f39c3315","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mulesoft/mule/pulls/7916/commits","review_comments_url":"https://api.github.com/repos/mulesoft/mule/pulls/7916/comments","review_comment_url":"https://api.github.com/repos/mulesoft/mule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mulesoft/mule/issues/7916/comments","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/7b2a3f0da027ab7752493715e0144cb16c8b62f6","head":{"label":"mulesoft:MULE-16513-NonSinkApproach","ref":"MULE-16513-NonSinkApproach","sha":"7b2a3f0da027ab7752493715e0144cb16c8b62f6","user":{"login":"mulesoft","id":185740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/185740?v=4","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":7058562,"node_id":"MDEwOlJlcG9zaXRvcnk3MDU4NTYy","name":"mule","full_name":"mulesoft/mule","private":false,"owner":{"login":"mulesoft","id":185740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/185740?v=4","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mulesoft/mule","description":"Mule Community Edition","fork":false,"url":"https://api.github.com/repos/mulesoft/mule","forks_url":"https://api.github.com/repos/mulesoft/mule/forks","keys_url":"https://api.github.com/repos/mulesoft/mule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/mule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/mule/teams","hooks_url":"https://api.github.com/repos/mulesoft/mule/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/mule/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/mule/events","assignees_url":"https://api.github.com/repos/mulesoft/mule/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/mule/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/mule/tags","blobs_url":"https://api.github.com/repos/mulesoft/mule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/mule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/mule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/mule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/mule/languages","stargazers_url":"https://api.github.com/repos/mulesoft/mule/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/mule/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/mule/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/mule/subscription","commits_url":"https://api.github.com/repos/mulesoft/mule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/mule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/mule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/mule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/mule/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/mule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/mule/merges","archive_url":"https://api.github.com/repos/mulesoft/mule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/mule/downloads","issues_url":"https://api.github.com/repos/mulesoft/mule/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/mule/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/mule/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/mule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/mule/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/mule/releases{/id}","deployments_url":"https://api.github.com/repos/mulesoft/mule/deployments","created_at":"2012-12-07T19:23:06Z","updated_at":"2019-06-10T23:06:34Z","pushed_at":"2019-06-10T23:06:36Z","git_url":"git://github.com/mulesoft/mule.git","ssh_url":"git@github.com:mulesoft/mule.git","clone_url":"https://github.com/mulesoft/mule.git","svn_url":"https://github.com/mulesoft/mule","homepage":null,"size":235443,"stargazers_count":729,"watchers_count":729,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":546,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":21,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":546,"open_issues":21,"watchers":729,"default_branch":"mule-4.x"}},"base":{"label":"mulesoft:mule-4.x","ref":"mule-4.x","sha":"70ee63bcc07505db3f3b6553dd99fd09045c0632","user":{"login":"mulesoft","id":185740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/185740?v=4","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"repo":{"id":7058562,"node_id":"MDEwOlJlcG9zaXRvcnk3MDU4NTYy","name":"mule","full_name":"mulesoft/mule","private":false,"owner":{"login":"mulesoft","id":185740,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4NTc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/185740?v=4","gravatar_id":"","url":"https://api.github.com/users/mulesoft","html_url":"https://github.com/mulesoft","followers_url":"https://api.github.com/users/mulesoft/followers","following_url":"https://api.github.com/users/mulesoft/following{/other_user}","gists_url":"https://api.github.com/users/mulesoft/gists{/gist_id}","starred_url":"https://api.github.com/users/mulesoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulesoft/subscriptions","organizations_url":"https://api.github.com/users/mulesoft/orgs","repos_url":"https://api.github.com/users/mulesoft/repos","events_url":"https://api.github.com/users/mulesoft/events{/privacy}","received_events_url":"https://api.github.com/users/mulesoft/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mulesoft/mule","description":"Mule Community Edition","fork":false,"url":"https://api.github.com/repos/mulesoft/mule","forks_url":"https://api.github.com/repos/mulesoft/mule/forks","keys_url":"https://api.github.com/repos/mulesoft/mule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mulesoft/mule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mulesoft/mule/teams","hooks_url":"https://api.github.com/repos/mulesoft/mule/hooks","issue_events_url":"https://api.github.com/repos/mulesoft/mule/issues/events{/number}","events_url":"https://api.github.com/repos/mulesoft/mule/events","assignees_url":"https://api.github.com/repos/mulesoft/mule/assignees{/user}","branches_url":"https://api.github.com/repos/mulesoft/mule/branches{/branch}","tags_url":"https://api.github.com/repos/mulesoft/mule/tags","blobs_url":"https://api.github.com/repos/mulesoft/mule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mulesoft/mule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mulesoft/mule/git/refs{/sha}","trees_url":"https://api.github.com/repos/mulesoft/mule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mulesoft/mule/statuses/{sha}","languages_url":"https://api.github.com/repos/mulesoft/mule/languages","stargazers_url":"https://api.github.com/repos/mulesoft/mule/stargazers","contributors_url":"https://api.github.com/repos/mulesoft/mule/contributors","subscribers_url":"https://api.github.com/repos/mulesoft/mule/subscribers","subscription_url":"https://api.github.com/repos/mulesoft/mule/subscription","commits_url":"https://api.github.com/repos/mulesoft/mule/commits{/sha}","git_commits_url":"https://api.github.com/repos/mulesoft/mule/git/commits{/sha}","comments_url":"https://api.github.com/repos/mulesoft/mule/comments{/number}","issue_comment_url":"https://api.github.com/repos/mulesoft/mule/issues/comments{/number}","contents_url":"https://api.github.com/repos/mulesoft/mule/contents/{+path}","compare_url":"https://api.github.com/repos/mulesoft/mule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mulesoft/mule/merges","archive_url":"https://api.github.com/repos/mulesoft/mule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mulesoft/mule/downloads","issues_url":"https://api.github.com/repos/mulesoft/mule/issues{/number}","pulls_url":"https://api.github.com/repos/mulesoft/mule/pulls{/number}","milestones_url":"https://api.github.com/repos/mulesoft/mule/milestones{/number}","notifications_url":"https://api.github.com/repos/mulesoft/mule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mulesoft/mule/labels{/name}","releases_url":"https://api.github.com/repos/mulesoft/mule/releases{/id}","deployments_url":"https://api.github.com/repos/mulesoft/mule/deployments","created_at":"2012-12-07T19:23:06Z","updated_at":"2019-06-10T23:06:34Z","pushed_at":"2019-06-10T23:06:36Z","git_url":"git://github.com/mulesoft/mule.git","ssh_url":"git@github.com:mulesoft/mule.git","clone_url":"https://github.com/mulesoft/mule.git","svn_url":"https://github.com/mulesoft/mule","homepage":null,"size":235443,"stargazers_count":729,"watchers_count":729,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":546,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":21,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":546,"open_issues":21,"watchers":729,"default_branch":"mule-4.x"}},"_links":{"self":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/7916"},"html":{"href":"https://github.com/mulesoft/mule/pull/7916"},"issue":{"href":"https://api.github.com/repos/mulesoft/mule/issues/7916"},"comments":{"href":"https://api.github.com/repos/mulesoft/mule/issues/7916/comments"},"review_comments":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/7916/comments"},"review_comment":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mulesoft/mule/pulls/7916/commits"},"statuses":{"href":"https://api.github.com/repos/mulesoft/mule/statuses/7b2a3f0da027ab7752493715e0144cb16c8b62f6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"elrodro83"}}