{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/177021364","pull_request_review_id":106820953,"id":177021364,"diff_hunk":"@@ -0,0 +1,284 @@\n+.. index::\n+   single: Message\n+   single: Components; Message\n+\n+The Message Component\n+=====================\n+\n+    The Message component helps application to send and receive messages\n+    to/from other applications or via\n+\n+Installation\n+------------\n+\n+.. code-block:: terminal\n+\n+    $ composer require symfony/message\n+\n+Alternatively, you can clone the `<https://github.com/symfony/message>`_ repository.\n+\n+.. include:: /components/require_autoload.rst.inc\n+\n+Concepts\n+--------\n+\n+.. image:: /_images/components/message/overview.png\n+\n+**Sender**:\n+   Responsible for serializing and sending the message to _something_. This\n+   something can be a message broker or a third party API for example.\n+\n+**Receiver**:\n+   Responsible for deserializing and forwarding the messages to handler(s). This\n+   can be a message queue puller or an API endpoint for example.\n+\n+**Handler**:\n+   Given a received message, contains the user business logic related to the\n+   message. In practice, that is just a PHP callable.\n+\n+Bus\n+---\n+\n+The bus is used to dispatch messages. MessageBus' behavior is in its ordered\n+middleware stack. When using the message bus with Symfony's FrameworkBundle, the\n+following middlewares are configured for you:\n+\n+#. ``LoggingMiddleware`` (logs the processing of your messages)\n+#. ``SendMessageMiddleware`` (enables asynchronous processing)\n+#. ``HandleMessageMiddleware`` (calls the registered handle)\n+\n+Example::\n+\n+    use App\\Message\\MyMessage;\n+\n+    $result = $this->get('message_bus')->handle(new MyMessage(/* ... */));\n+\n+Handlers\n+--------\n+\n+Once dispatched to the bus, messages will be handled by a \"message handler\". A\n+message handler is a PHP callable (i.e. a function or an instance of a class)\n+that will do the required processing for your message. It _might_ return a\n+result::\n+\n+    namespace App\\MessageHandler;\n+\n+    use App\\Message\\MyMessage;\n+\n+    class MyMessageHandler\n+    {\n+       public function __invoke(MyMessage $message)\n+       {\n+           // Message processing...\n+       }\n+    }\n+\n+.. code-block:: xml\n+\n+    <service id=\"App\\Handler\\MyMessageHandler\">\n+       <tag name=\"message_handler\" />\n+    </service>\n+\n+.. note::\n+\n+    If the message cannot be guessed from the handler's type-hint, use the\n+    ``handles`` attribute on the tag.\n+\n+Asynchronous messages\n+~~~~~~~~~~~~~~~~~~~~~\n+\n+Using the Message Component is useful to decouple your application but it also","path":"components/message.rst","position":90,"original_position":90,"commit_id":"88ba8feb83ebdb78ea59020e3d8dd5a7754601d6","original_commit_id":"88ba8feb83ebdb78ea59020e3d8dd5a7754601d6","user":{"login":"OskarStark","id":995707,"avatar_url":"https://avatars0.githubusercontent.com/u/995707?v=4","gravatar_id":"","url":"https://api.github.com/users/OskarStark","html_url":"https://github.com/OskarStark","followers_url":"https://api.github.com/users/OskarStark/followers","following_url":"https://api.github.com/users/OskarStark/following{/other_user}","gists_url":"https://api.github.com/users/OskarStark/gists{/gist_id}","starred_url":"https://api.github.com/users/OskarStark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OskarStark/subscriptions","organizations_url":"https://api.github.com/users/OskarStark/orgs","repos_url":"https://api.github.com/users/OskarStark/repos","events_url":"https://api.github.com/users/OskarStark/events{/privacy}","received_events_url":"https://api.github.com/users/OskarStark/received_events","type":"User","site_admin":false},"body":"Messenger","created_at":"2018-03-26T09:02:34Z","updated_at":"2018-03-26T09:02:34Z","html_url":"https://github.com/symfony/symfony-docs/pull/9437#discussion_r177021364","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/177021364"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/9437#discussion_r177021364"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437"}},"in_reply_to_id":177020482},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437","id":174980574,"html_url":"https://github.com/symfony/symfony-docs/pull/9437","diff_url":"https://github.com/symfony/symfony-docs/pull/9437.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/9437.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/9437","number":9437,"state":"open","locked":false,"title":"Symfony Messenger component documentation","user":{"login":"sroze","id":804625,"avatar_url":"https://avatars0.githubusercontent.com/u/804625?v=4","gravatar_id":"","url":"https://api.github.com/users/sroze","html_url":"https://github.com/sroze","followers_url":"https://api.github.com/users/sroze/followers","following_url":"https://api.github.com/users/sroze/following{/other_user}","gists_url":"https://api.github.com/users/sroze/gists{/gist_id}","starred_url":"https://api.github.com/users/sroze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroze/subscriptions","organizations_url":"https://api.github.com/users/sroze/orgs","repos_url":"https://api.github.com/users/sroze/repos","events_url":"https://api.github.com/users/sroze/events{/privacy}","received_events_url":"https://api.github.com/users/sroze/received_events","type":"User","site_admin":false},"body":"This pull-request adds some documentation for the Message component. As it is, it's extracted from the README built incrementally in the code pull-request.\r\n\r\nI'm sure there will be lots to change when the implementation is merged :)","created_at":"2018-03-14T14:51:47Z","updated_at":"2018-03-26T09:02:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72cdd564f80e72f37883decdbd0d5233e67123a0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":390692613,"url":"https://api.github.com/repos/symfony/symfony-docs/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/9437/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/88ba8feb83ebdb78ea59020e3d8dd5a7754601d6","head":{"label":"sroze:add-message-component","ref":"add-message-component","sha":"88ba8feb83ebdb78ea59020e3d8dd5a7754601d6","user":{"login":"sroze","id":804625,"avatar_url":"https://avatars0.githubusercontent.com/u/804625?v=4","gravatar_id":"","url":"https://api.github.com/users/sroze","html_url":"https://github.com/sroze","followers_url":"https://api.github.com/users/sroze/followers","following_url":"https://api.github.com/users/sroze/following{/other_user}","gists_url":"https://api.github.com/users/sroze/gists{/gist_id}","starred_url":"https://api.github.com/users/sroze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroze/subscriptions","organizations_url":"https://api.github.com/users/sroze/orgs","repos_url":"https://api.github.com/users/sroze/repos","events_url":"https://api.github.com/users/sroze/events{/privacy}","received_events_url":"https://api.github.com/users/sroze/received_events","type":"User","site_admin":false},"repo":{"id":15308361,"name":"symfony-docs","full_name":"sroze/symfony-docs","owner":{"login":"sroze","id":804625,"avatar_url":"https://avatars0.githubusercontent.com/u/804625?v=4","gravatar_id":"","url":"https://api.github.com/users/sroze","html_url":"https://github.com/sroze","followers_url":"https://api.github.com/users/sroze/followers","following_url":"https://api.github.com/users/sroze/following{/other_user}","gists_url":"https://api.github.com/users/sroze/gists{/gist_id}","starred_url":"https://api.github.com/users/sroze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroze/subscriptions","organizations_url":"https://api.github.com/users/sroze/orgs","repos_url":"https://api.github.com/users/sroze/repos","events_url":"https://api.github.com/users/sroze/events{/privacy}","received_events_url":"https://api.github.com/users/sroze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sroze/symfony-docs","description":"The Symfony2 documentation","fork":true,"url":"https://api.github.com/repos/sroze/symfony-docs","forks_url":"https://api.github.com/repos/sroze/symfony-docs/forks","keys_url":"https://api.github.com/repos/sroze/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sroze/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sroze/symfony-docs/teams","hooks_url":"https://api.github.com/repos/sroze/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/sroze/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/sroze/symfony-docs/events","assignees_url":"https://api.github.com/repos/sroze/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/sroze/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/sroze/symfony-docs/tags","blobs_url":"https://api.github.com/repos/sroze/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sroze/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sroze/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sroze/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sroze/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/sroze/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/sroze/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/sroze/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/sroze/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/sroze/symfony-docs/subscription","commits_url":"https://api.github.com/repos/sroze/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sroze/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sroze/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sroze/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sroze/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/sroze/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sroze/symfony-docs/merges","archive_url":"https://api.github.com/repos/sroze/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sroze/symfony-docs/downloads","issues_url":"https://api.github.com/repos/sroze/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/sroze/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/sroze/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/sroze/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sroze/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/sroze/symfony-docs/releases{/id}","deployments_url":"https://api.github.com/repos/sroze/symfony-docs/deployments","created_at":"2013-12-19T10:03:02Z","updated_at":"2018-01-08T14:42:21Z","pushed_at":"2018-03-23T10:25:54Z","git_url":"git://github.com/sroze/symfony-docs.git","ssh_url":"git@github.com:sroze/symfony-docs.git","clone_url":"https://github.com/sroze/symfony-docs.git","svn_url":"https://github.com/sroze/symfony-docs","homepage":"http://symfony.com/doc/current/","size":44294,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"symfony:master","ref":"master","sha":"989d594c20a937df520e9677aaa5339f7845af3b","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony-docs","description":"The Symfony documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","deployments_url":"https://api.github.com/repos/symfony/symfony-docs/deployments","created_at":"2010-02-17T08:43:51Z","updated_at":"2018-03-25T18:54:44Z","pushed_at":"2018-03-25T18:57:18Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"https://symfony.com/doc","size":45687,"stargazers_count":1388,"watchers_count":1388,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3461,"mirror_url":null,"archived":false,"open_issues_count":343,"license":null,"forks":3461,"open_issues":343,"watchers":1388,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/9437"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/9437"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/9437/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/9437/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/88ba8feb83ebdb78ea59020e3d8dd5a7754601d6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"OskarStark"}}