8000 rabbitmq-tutorials/erlang at rabbitmq-tutorials-102 · bsumgit/rabbitmq-tutorials · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"path":"erlang","repo":{"id":84954296,"defaultBranch":"master","name":"rabbitmq-tutorials","ownerLogin":"bsumgit","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2017-03-14T13:48:56.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/7982441?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"rabbitmq-tutorials-102","listCacheKey":"v0:1618741932.288447","canEdit":false,"refType":"branch","currentOid":"f97d382edf381b88847dc576882fa2127bd07c0a"},"tree":{"items":[{"name":"README.md","path":"erlang/README.md","contentType":"file"},{"name":"emit_log.erl","path":"erlang/emit_log.erl","contentType":"file"},{"name":"emit_log_direct.erl","path":"erlang/emit_log_direct.erl","contentType":"file"},{"name":"emit_log_topic.erl","path":"erlang/emit_log_topic.erl","contentType":"file"},{"name":"new_task.erl","path":"erlang/new_task.erl","contentType":"file"},{"name":"receive.erl","path":"erlang/receive.erl","contentType":"file"},{"name":"receive_logs.erl","path":"erlang/receive_logs.erl","contentType":"file"},{"name":"receive_logs_direct.erl","path":"erlang/receive_logs_direct.erl","contentType":"file"},{"name":"receive_logs_topic.erl","path":"erlang/receive_logs_topic.erl","contentType":"file"},{"name":"send.erl","path":"erlang/send.erl","contentType":"file"},{"name":"worker.erl","path":"erlang/worker.erl","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eErlang code for RabbitMQ tutorials\u003c/h1\u003e\u003ca id=\"user-content-erlang-code-for-rabbitmq-tutorials\" class=\"anchor\" aria-label=\"Permalink: Erlang code for RabbitMQ tutorials\" href=\"#erlang-code-for-rabbitmq-tutorials\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eHere you can find a Erlang code examples from \u003ca href=\"http://www.rabbitmq.com/getstarted.html\" rel=\"nofollow\"\u003eRabbitMQ\ntutorials\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis code is using \u003ca href=\"http://hg.rabbitmq.com/rabbitmq-erlang-client/\" rel=\"nofollow\"\u003eRabbitMQ Erlang\nClient\u003c/a\u003e (\u003ca href=\"http://www.rabbitmq.com/erlang-client-user-guide.html\" rel=\"nofollow\"\u003eUser\nGuide\u003c/a\u003e).\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRequirements\u003c/h2\u003e\u003ca id=\"user-content-requirements\" class=\"anchor\" aria-label=\"Permalink: Requirements\" href=\"#requirements\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo run this code you need at least \u003ca href=\"http://erlang.org/download.html\" rel=\"nofollow\"\u003eErlang\nR13B03\u003c/a\u003e, on Ubuntu you can get it\nusing apt:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"sudo apt-get install erlang\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003esudo apt-get install erlang\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou need Erlang Client binaries:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"wget http://www.rabbitmq.com/releases/rabbitmq-erlang-client/v2.7.0/rabbit_common-2.7.0.ez\nunzip rabbit_common-2.7.0.ez\nln -s rabbit_common-2.7.0 rabbit_common\n\nwget http://www.rabbitmq.com/releases/rabbitmq-erlang-client/v2.7.0/amqp_client-2.7.0.ez\nunzip amqp_client-2.7.0.ez\nln -s amqp_client-2.7.0 amqp_client\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003ewget http://www.rabbitmq.com/releases/rabbitmq-erlang-client/v2.7.0/rabbit_common-2.7.0.ez\nunzip rabbit_common-2.7.0.ez\nln -s rabbit_common-2.7.0 rabbit_common\n\nwget http://www.rabbitmq.com/releases/rabbitmq-erlang-client/v2.7.0/amqp_client-2.7.0.ez\nunzip amqp_client-2.7.0.ez\nln -s amqp_client-2.7.0 amqp_client\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCode\u003c/h2\u003e\u003ca id=\"user-content-code\" class=\"anchor\" aria-label=\"Permalink: Code\" href=\"#code\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"http://www.rabbitmq.com/tutorial-one-python.html\" rel=\"nofollow\"\u003eTutorial one: \"Hello World!\"\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"./send.erl\n./receive.erl\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e./send.erl\n./receive.erl\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"http://www.rabbitmq.com/tutorial-two-python.html\" rel=\"nofollow\"\u003eTutorial two: Work Queues\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"./new_task.erl \u0026quot;A very hard task which takes two seconds..\u0026quot;\n./worker.erl\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e./new_task.erl \"A very hard task which takes two seconds..\"\n./worker.erl\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"http://www.rabbitmq.com/tutorial-three-python.html\" rel=\"nofollow\"\u003eTutorial three: Publish/Subscribe\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"./receive_logs.erl\n./emit_log.erl \u0026quot;info: This is the log message\u0026quot;\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e./receive_logs.erl\n./emit_log.erl \"info: This is the log message\"\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"http://www.rabbitmq.com/tutorial-four-python.html\" rel=\"nofollow\"\u003eTutorial four: Routing\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"./receive_logs_direct.erl info\n./emit_log_direct.erl info Hello\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e./receive_logs_direct.erl info\n./emit_log_direct.erl info Hello\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"http://www.rabbitmq.com/tutorial-five-python.html\" rel=\"nofollow\"\u003eTutorial five: Topics\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"./receive_logs_topic.erl \u0026quot;*.rabbit\u0026quot;\n./emit_log_topic.erl red.rabbit Hello\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003e./receive_logs_topic.erl \"*.rabbit\"\n./emit_log_topic.erl red.rabbit Hello\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Erlang code for RabbitMQ tutorials","anchor":"erlang-code-for-rabbitmq-tutorials","htmlText":"Erlang code for RabbitMQ tutorials"},{"level":2,"text":"Requirements","anchor":"requirements","htmlText":"Requirements"},{"level":2,"text":"Code","anchor":"code","htmlText":"Code"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fbsumgit%2Frabbitmq-tutorials%2Ftree%2Frabbitmq-tutorials-102%2Ferlang"}},"totalCount":11,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":"bin","path":"bin","contentType":"directory"},{"name":"clojure","path":"clojure","contentType":"directory"},{"name":"common-lisp","path":"common-lisp","contentType":"directory"},{"name":"dotnet-visual-studio","path":"dotnet-visual-studio","contentType":"directory"},{"name":"dotnet","path":"dotnet","contentType":"directory"},{"name":"elixir","path":"elixir","contentType":"directory"},{"name":"erlang","path":"erlang","contentType":"directory"},{"name":"go","path":"go","contentType":"directory"},{"name":"haskell","path":"haskell","contentType":"directory"},{"name":"java-idea","path":"java-idea","contentType":"directory"},{"name":"java","path":"java","contentType":"directory"},{"name":"javascript-nodejs","path":"javascript-nodejs","contentType":"directory"},{"name":"objective-c","path":"objective-c","contentType":"directory"},{"name":"perl","path":"perl","contentType":"directory"},{"name":"php-amqp","path":"php-amqp","contentType":"directory"},{"name":"php","path":"php","contentType":"directory"},{"name":"python","path":"python","contentType":"directory"},{"name":"ruby","path":"ruby","contentType":"directory"},{"name":"swift","path":"swift","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"test.py","path":"test.py","contentType":"file"},{"name":"travisci.py","path":"travisci.py","contentType":"file"}],"totalCount":26}},"fileTreeProcessingTime":11.773553000000001,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/bsumgit/rabbitmq-tutorials/branches":{"post":"OrFBRvtWd8jJC0vowXlAUaNEf7yU-xZNBFmlzsu5kw1kkiFK3Lzi_-VNLGo9oX-RTk_WmcMOucRqViv2FaM45A"},"/bsumgit/rabbitmq-tutorials/branches/fetch_and_merge/rabbitmq-tutorials-102":{"post":"FViw3q__0SuHJskfGxCNR3NZOwqOAu1ligo_i0UByia-92xXaITzv-CYGL_Armjy4V201sm162wKBhZkCj8Mjg"},"/bsumgit/rabbitmq-tutorials/branches/fetch_and_merge/rabbitmq-tutorials-102?discard_changes=true":{"post":"qggZPXu85OcPoZ_Db9RUH-NR33BeJl-oxrL6N4b7zmEBp8W0vMfGc2gfTmO0arGqcVVQrBmRWaFGvtPYycUIyQ"}}},"title":"rabbitmq-tutorials/erlang at rabbitmq-tutorials-102 · bsumgit/rabbitmq-tutorials","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0