{"action":"created","comment":{"url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/comments/180836662","pull_request_review_id":111328860,"id":180836662,"diff_hunk":"@@ -96,6 +96,27 @@ Routers are implemented as actors, so a router is supervised by it's parent, and\n \n By default, pool routers use a custom strategy that only returns `Escalate` for all exceptions, the router supervising the failing worker will then escalate to it's own parent, if the parent of the router decides to restart the router, all the pool workers will also be recreated as a result of this.\n \n+## Sending messages to actors behind router\n+\n+As routers are actors, we send over messages to actors they manage the same way we communicate to other actors via `ActorRef`:\n+\n+```cs\n+var router = system.ActorOf(Props.Create<Worker>().WithRouter(new RoundRobinPool(3)), \"some-pool\");\n+foreach (var element in Enumerable.Range(0, 6))\n+{\n+  router.Tell(new Message(element));\n+}\n+```\n+\n+Router will send over messages according to its strategy.\n+In this particular case, we have `RoundRobinPool` configuration that will:","path":"docs/articles/actors/routers.md","position":17,"original_position":17,"commit_id":"c4016b950ac5f328156e36ead3406fe0e563ce1d","original_commit_id":"c4016b950ac5f328156e36ead3406fe0e563ce1d","user":{"login":"Danthar","id":986519,"avatar_url":"https://avatars1.githubusercontent.com/u/986519?v=4","gravatar_id":"","url":"https://api.github.com/users/Danthar","html_url":"https://github.com/Danthar","followers_url":"https://api.github.com/users/Danthar/followers","following_url":"https://api.github.com/users/Danthar/following{/other_user}","gists_url":"https://api.github.com/users/Danthar/gists{/gist_id}","starred_url":"https://api.github.com/users/Danthar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Danthar/subscriptions","organizations_url":"https://api.github.com/users/Danthar/orgs","repos_url":"https://api.github.com/users/Danthar/repos","events_url":"https://api.github.com/users/Danthar/events{/privacy}","received_events_url":"https://api.github.com/users/Danthar/received_events","type":"User","site_admin":false},"body":"In this particular case, we **use the** `RoundRobinPool` configuration that will:","created_at":"2018-04-11T17:31:33Z","updated_at":"2018-04-11T17:37:30Z","html_url":"https://github.com/akkadotnet/akka.net/pull/3384#discussion_r180836662","pull_request_url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/akkadotnet/akka.net/pulls/comments/180836662"},"html":{"href":"https://github.com/akkadotnet/akka.net/pull/3384#discussion_r180836662"},"pull_request":{"href":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384"}}},"pull_request":{"url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384","id":180172962,"html_url":"https://github.com/akkadotnet/akka.net/pull/3384","diff_url":"https://github.com/akkadotnet/akka.net/pull/3384.diff","patch_url":"https://github.com/akkadotnet/akka.net/pull/3384.patch","issue_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/3384","number":3384,"state":"open","locked":false,"title":"Updated example on how to send message to actors behind router","user":{"login":"m-wilczynski","id":6330789,"avatar_url":"https://avatars0.githubusercontent.com/u/6330789?v=4","gravatar_id":"","url":"https://api.github.com/users/m-wilczynski","html_url":"https://github.com/m-wilczynski","followers_url":"https://api.github.com/users/m-wilczynski/followers","following_url":"https://api.github.com/users/m-wilczynski/following{/other_user}","gists_url":"https://api.github.com/users/m-wilczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/m-wilczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-wilczynski/subscriptions","organizations_url":"https://api.github.com/users/m-wilczynski/orgs","repos_url":"https://api.github.com/users/m-wilczynski/repos","events_url":"https://api.github.com/users/m-wilczynski/events{/privacy}","received_events_url":"https://api.github.com/users/m-wilczynski/received_events","type":"User","site_admin":false},"body":"Updated example on how to send message to actors behind router.\r\nThis might be trivial for those who already use Akka.NET but for newcomers it's not so obvious (wasn't for me), that you simply communicate with it via its `IActorRef` and then it sends the messages to actors' mailboxes according to its routing strategy.","created_at":"2018-04-08T18:26:25Z","updated_at":"2018-04-11T17:37:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbfde4f50718f4969906bf82b3ec438cb8395fbd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384/commits","review_comments_url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384/comments","review_comment_url":"https://api.github.com/repos/akkadotnet/akka.net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/3384/comments","statuses_url":"https://api.github.com/repos/akkadotnet/akka.net/statuses/c4016b950ac5f328156e36ead3406fe0e563ce1d","head":{"label":"m-wilczynski:router-example","ref":"router-example","sha":"c4016b950ac5f328156e36ead3406fe0e563ce1d","user":{"login":"m-wilczynski","id":6330789,"avatar_url":"https://avatars0.githubusercontent.com/u/6330789?v=4","gravatar_id":"","url":"https://api.github.com/users/m-wilczynski","html_url":"https://github.com/m-wilczynski","followers_url":"https://api.github.com/users/m-wilczynski/followers","following_url":"https://api.github.com/users/m-wilczynski/following{/other_user}","gists_url":"https://api.github.com/users/m-wilczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/m-wilczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-wilczynski/subscriptions","organizations_url":"https://api.github.com/users/m-wilczynski/orgs","repos_url":"https://api.github.com/users/m-wilczynski/repos","events_url":"https://api.github.com/users/m-wilczynski/events{/privacy}","received_events_url":"https://api.github.com/users/m-wilczynski/received_events","type":"User","site_admin":false},"repo":{"id":128666686,"name":"akka.net","full_name":"m-wilczynski/akka.net","owner":{"login":"m-wilczynski","id":6330789,"avatar_url":"https://avatars0.githubusercontent.com/u/6330789?v=4","gravatar_id":"","url":"https://api.github.com/users/m-wilczynski","html_url":"https://github.com/m-wilczynski","followers_url":"https://api.github.com/users/m-wilczynski/followers","following_url":"https://api.github.com/users/m-wilczynski/following{/other_user}","gists_url":"https://api.github.com/users/m-wilczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/m-wilczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-wilczynski/subscriptions","organizations_url":"https://api.github.com/users/m-wilczynski/orgs","repos_url":"https://api.github.com/users/m-wilczynski/repos","events_url":"https://api.github.com/users/m-wilczynski/events{/privacy}","received_events_url":"https://api.github.com/users/m-wilczynski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m-wilczynski/akka.net","description":"Port of Akka actors for .NET","fork":true,"url":"https://api.github.com/repos/m-wilczynski/akka.net","forks_url":"https://api.github.com/repos/m-wilczynski/akka.net/forks","keys_url":"https://api.github.com/repos/m-wilczynski/akka.net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-wilczynski/akka.net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-wilczynski/akka.net/teams","hooks_url":"https://api.github.com/repos/m-wilczynski/akka.net/hooks","issue_events_url":"https://api.github.com/repos/m-wilczynski/akka.net/issues/events{/number}","events_url":"https://api.github.com/repos/m-wilczynski/akka.net/events","assignees_url":"https://api.github.com/repos/m-wilczynski/akka.net/assignees{/user}","branches_url":"https://api.github.com/repos/m-wilczynski/akka.net/branches{/branch}","tags_url":"https://api.github.com/repos/m-wilczynski/akka.net/tags","blobs_url":"https://api.github.com/repos/m-wilczynski/akka.net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-wilczynski/akka.net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-wilczynski/akka.net/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-wilczynski/akka.net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-wilczynski/akka.net/statuses/{sha}","languages_url":"https://api.github.com/repos/m-wilczynski/akka.net/languages","stargazers_url":"https://api.github.com/repos/m-wilczynski/akka.net/stargazers","contributors_url":"https://api.github.com/repos/m-wilczynski/akka.net/contributors","subscribers_url":"https://api.github.com/repos/m-wilczynski/akka.net/subscribers","subscription_url":"https://api.github.com/repos/m-wilczynski/akka.net/subscription","commits_url":"https://api.github.com/repos/m-wilczynski/akka.net/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-wilczynski/akka.net/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-wilczynski/akka.net/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-wilczynski/akka.net/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-wilczynski/akka.net/contents/{+path}","compare_url":"https://api.github.com/repos/m-wilczynski/akka.net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-wilczynski/akka.net/merges","archive_url":"https://api.github.com/repos/m-wilczynski/akka.net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-wilczynski/akka.net/downloads","issues_url":"https://api.github.com/repos/m-wilczynski/akka.net/issues{/number}","pulls_url":"https://api.github.com/repos/m-wilczynski/akka.net/pulls{/number}","milestones_url":"https://api.github.com/repos/m-wilczynski/akka.net/milestones{/number}","notifications_url":"https://api.github.com/repos/m-wilczynski/akka.net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-wilczynski/akka.net/labels{/name}","releases_url":"https://api.github.com/repos/m-wilczynski/akka.net/releases{/id}","deployments_url":"https://api.github.com/repos/m-wilczynski/akka.net/deployments","created_at":"2018-04-08T17:46:56Z","updated_at":"2018-04-08T17:47:04Z","pushed_at":"2018-04-08T18:24:59Z","git_url":"git://github.com/m-wilczynski/akka.net.git","ssh_url":"git@github.com:m-wilczynski/akka.net.git","clone_url":"https://github.com/m-wilczynski/akka.net.git","svn_url":"https://github.com/m-wilczynski/akka.net","homepage":"http://getakka.net","size":67582,"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},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"akkadotnet:dev","ref":"dev","sha":"838971a893d630bb18aeb5d6ca263e27de856a34","user":{"login":"akkadotnet","id":7003835,"avatar_url":"https://avatars2.githubusercontent.com/u/7003835?v=4","gravatar_id":"","url":"https://api.github.com/users/akkadotnet","html_url":"https://github.com/akkadotnet","followers_url":"https://api.github.com/users/akkadotnet/followers","following_url":"https://api.github.com/users/akkadotnet/following{/other_user}","gists_url":"https://api.github.com/users/akkadotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/akkadotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akkadotnet/subscriptions","organizations_url":"https://api.github.com/users/akkadotnet/orgs","repos_url":"https://api.github.com/users/akkadotnet/repos","events_url":"https://api.github.com/users/akkadotnet/events{/privacy}","received_events_url":"https://api.github.com/users/akkadotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":15509440,"name":"akka.net","full_name":"akkadotnet/akka.net","owner":{"login":"akkadotnet","id":7003835,"avatar_url":"https://avatars2.githubusercontent.com/u/7003835?v=4","gravatar_id":"","url":"https://api.github.com/users/akkadotnet","html_url":"https://github.com/akkadotnet","followers_url":"https://api.github.com/users/akkadotnet/followers","following_url":"https://api.github.com/users/akkadotnet/following{/other_user}","gists_url":"https://api.github.com/users/akkadotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/akkadotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akkadotnet/subscriptions","organizations_url":"https://api.github.com/users/akkadotnet/orgs","repos_url":"https://api.github.com/users/akkadotnet/repos","events_url":"https://api.github.com/users/akkadotnet/events{/privacy}","received_events_url":"https://api.github.com/users/akkadotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akkadotnet/akka.net","description":"Port of Akka actors for .NET","fork":false,"url":"https://api.github.com/repos/akkadotnet/akka.net","forks_url":"https://api.github.com/repos/akkadotnet/akka.net/forks","keys_url":"https://api.github.com/repos/akkadotnet/akka.net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akkadotnet/akka.net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akkadotnet/akka.net/teams","hooks_url":"https://api.github.com/repos/akkadotnet/akka.net/hooks","issue_events_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/events{/number}","events_url":"https://api.github.com/repos/akkadotnet/akka.net/events","assignees_url":"https://api.github.com/repos/akkadotnet/akka.net/assignees{/user}","branches_url":"https://api.github.com/repos/akkadotnet/akka.net/branches{/branch}","tags_url":"https://api.github.com/repos/akkadotnet/akka.net/tags","blobs_url":"https://api.github.com/repos/akkadotnet/akka.net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akkadotnet/akka.net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akkadotnet/akka.net/git/refs{/sha}","trees_url":"https://api.github.com/repos/akkadotnet/akka.net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akkadotnet/akka.net/statuses/{sha}","languages_url":"https://api.github.com/repos/akkadotnet/akka.net/languages","stargazers_url":"https://api.github.com/repos/akkadotnet/akka.net/stargazers","contributors_url":"https://api.github.com/repos/akkadotnet/akka.net/contributors","subscribers_url":"https://api.github.com/repos/akkadotnet/akka.net/subscribers","subscription_url":"https://api.github.com/repos/akkadotnet/akka.net/subscription","commits_url":"https://api.github.com/repos/akkadotnet/akka.net/commits{/sha}","git_commits_url":"https://api.github.com/repos/akkadotnet/akka.net/git/commits{/sha}","comments_url":"https://api.github.com/repos/akkadotnet/akka.net/comments{/number}","issue_comment_url":"https://api.github.com/repos/akkadotnet/akka.net/issues/comments{/number}","contents_url":"https://api.github.com/repos/akkadotnet/akka.net/contents/{+path}","compare_url":"https://api.github.com/repos/akkadotnet/akka.net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akkadotnet/akka.net/merges","archive_url":"https://api.github.com/repos/akkadotnet/akka.net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akkadotnet/akka.net/downloads","issues_url":"https://api.github.com/repos/akkadotnet/akka.net/issues{/number}","pulls_url":"https://api.github.com/repos/akkadotnet/akka.net/pulls{/number}","milestones_url":"https://api.github.com/repos/akkadotnet/akka.net/milestones{/number}","notifications_url":"https://api.github.com/repos/akkadotnet/akka.net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akkadotnet/akka.net/labels{/name}","releases_url":"https://api.github.com/repos/akkadotnet/akka.net/releases{/id}","deployments_url":"https://api.github.com/repos/akkadotnet/akka.net/deployments","created_at":"2013-12-29T14:17:38Z","updated_at":"2018-04-11T11:48:42Z","pushed_at":"2018-04-11T16:07:24Z","git_url":"git://github.com/akkadotnet/akka.net.git","ssh_url":"git@github.com:akkadotnet/akka.net.git","clone_url":"https://github.com/akkadotnet/akka.net.git","svn_url":"https://github.com/akkadotnet/akka.net","homepage":"http://getakka.net","size":67577,"stargazers_count":2736,"watchers_count":2736,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":750,"mirror_url":null,"archived":false,"open_issues_count":318,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":750,"open_issues":318,"watchers":2736,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384"},"html":{"href":"https://github.com/akkadotnet/akka.net/pull/3384"},"issue":{"href":"https://api.github.com/repos/akkadotnet/akka.net/issues/3384"},"comments":{"href":"https://api.github.com/repos/akkadotnet/akka.net/issues/3384/comments"},"review_comments":{"href":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384/comments"},"review_comment":{"href":"https://api.github.com/repos/akkadotnet/akka.net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akkadotnet/akka.net/pulls/3384/commits"},"statuses":{"href":"https://api.github.com/repos/akkadotnet/akka.net/statuses/c4016b950ac5f328156e36ead3406fe0e563ce1d"}},"author_association":"NONE"}}
{"actor":{"display_login":"Danthar"}}