{"id":22399025,"url":"https://github.com/pangiole/akka-wamp","last_synced_at":"2025-07-31T13:32:36.908Z","repository":{"id":54535716,"uuid":"53246248","full_name":"pangiole/akka-wamp","owner":"pangiole","description":"WAMP - Web Application Messaging Protocol implementation written with Akka","archived":false,"fork":false,"pushed_at":"2018-09-10T15:15:01.000Z","size":1153,"stargazers_count":48,"open_issues_count":24,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-31T17:24:19.651Z","etag":null,"topics":["akka","scala","wamp-protocol","websocket"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pangiole.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-06T08:58:15.000Z","updated_at":"2023-03-18T14:44:39.000Z","dependencies_parsed_at":"2022-08-13T19:00:48.912Z","dependency_job_id":null,"html_url":"https://github.com/pangiole/akka-wamp","commit_stats":null,"previous_names":["angiolep/akka-wamp"],"tags_count":14,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangiole%2Fakka-wamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangiole%2Fakka-wamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangiole%2Fakka-wamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pangiole%2Fakka-wamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pangiole","download_url":"https://codeload.github.com/pangiole/akka-wamp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228249347,"owners_count":17891461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akka","scala","wamp-protocol","websocket"],"created_at":"2024-12-05T07:13:01.142Z","updated_at":"2024-12-05T07:13:01.581Z","avatar_url":"https://github.com/pangiole.png","language":"Scala","funding_links":[],"categories":["网络编程"],"sub_categories":["语音合成"],"readme":"# Akka Wamp \n[![Build Status][travis-image]][travis-url] [![CodeCov Status][codecov-image]][codecov-url] [![Gitter][gitter-image]][gitter-url] \n\nAkka Wamp is a WAMP - [Web Application Messaging Protocol](http://wamp-proto.org/) implementation written to let both [Scala](http://scala-lang.org/) and [Java](http://www.java.com) developers build the next generation of reactive web services on top of [Akka](http://akka.io/) abstractions.\n\nAkka Wamp provides you with:\n\n* Simple [Client APIs](https://angiolep.github.io/projects/akka-wamp/client) designed to be used with [Akka](http://akka.io/) actors, futures and streams.\n* Object-oriented representations of all WAMP [Messages](./messages.html),\n* Akka IO extenson driver for the WAMP Protocol.\n* Basic [Router](https://angiolep.github.io/projects/akka-wamp/router) you can embed in your applications or launch as standalone process.\n\n## Usage\nEasy to download as dependency from [Maven central](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.angiolep%22%20AND%20a%3A%22akka-wamp_2.12%22):\n\n```scala\nlibraryDependencies ++= Seq(\n  \"com.github.angiolep\" % \"akka-wamp_2.12\" % \"0.15.1\"\n)\n```\n\n## Docs\n* User's guide, code fragments and dozens of examples are published [here](https://angiolep.github.io/projects/akka-wamp).\n* API doc is published [here](https://angiolep.github.io/projects/akka-wamp/api/akka/wamp)\n\n\n## Client APIs\nConnect to a router, open a session, subscribe to a topic, consume events, register a remote procedure and call it in few lines of Scala or Java code.\n\n* Actors, Futures and Streams based APIs.\n* Lambda consumers and handlers support.\n* Lazy and pluggable deserializers.\n* Java 8 support.\n* ... and much more!\n\nPlease, read the docs for [further details](https://angiolep.github.io/projects/akka-wamp)\n\n\n### Java client\nThough written in Scala, Akka Wamp provides simple client APIs for Java developers as well. Compared to other WAMP implementations, Akka Wamp will let you write less code for much more functionalities!\n\n```java\nimport akka.actor.*;\nimport akka.wamp.client.japi.*;\n\nimport static java.util.Array.asList;\nimport static java.lang.System.out;\n\npublic class JavaClient {\n  public static void main(String[] arr) {\n    ActorSystem actorSystem = ActorSystem.create();\n    Client client = Client.create(actorSystem);\n    \n    client.connect(\"endpoint\").thenAccept(c -\u003e {\n      c.open(\"realm\").thenAccept(s -\u003e {\n    \n        s.publish(\"topic\", asList(\"Ciao!\"));\n    \n        s.subscribe(\"topic\", (event) -\u003e {\n          out.println(\"got \" + event.args().get(0));\n        });\n    \n        s.register(\"procedure\", (invoc) -\u003e {\n          Integer a = (Integer) invoc.args().get(0);\n          Integer b = (Integer) invoc.args().get(1);\n          return a + b;\n        });\n    \n        s.call(\"procedure\", asList(20, 55)).thenAccept(res -\u003e {\n          out.println(\"20 * 55 = \" + res.args().get(0));  \n        });\n      });\n    });\n  }\n}\n```\n\n\n### Scala client\nAkka Wamp provides Scala developer with great support to let them write _\"no boilerplate code\"_ at all! Just few statements and here it is a fully capable reactive WAMP client ;-)\n\n```scala\n\nimport akka.actor._\nimport akka.wamp.client._\n\nobject ScalaClient extends App {\n  \n  val system = ActorSystem()\n  val client = Client(system)\n  implicit val executionContext = system.dispatcher\n\n  client.connect(\"endpoint\").map { conn =\u003e\n    conn.open(\"realm\").map { implicit session =\u003e\n\n      subscribe(\"topic\", (arg: Int) =\u003e {\n        println(s\"got $arg\")\n      })\n\n      publish(\"topic\", List(\"Ciao!\"))\n\n      call(\"procedure\", List(20, 55)).foreach { res =\u003e\n        println(s\"20 * 55 = ${res.args(0)}\")\n      }\n      \n      register(\"procedure\", (a: Int, b: Int) =\u003e {\n        a + b\n      })\n    }\n  }\n}\n```\n\n## Router\n \n[![Download][download-image]][download-url]\n \nAkka Wamp provides you with a basic router that can be either embedded into your application or launched as standalone server process.\n\nDownload the latest router version, extract, configure and run it as standalone application:\n\n```bash\ncurl https://dl.bintray.com/angiolep/universal/akka-wamp-0.15.2.tgz\ntar xvfz akka-wamp-0.15.2.tar.gz\ncd akka-wamp-0.15.2\nvim ./conf/application.conf\n./bin/akka-wamp -Dakka.loglevel=DEBUG\n```\n\n\n## Limitations\n * Java \u003e= 1.8.0 \n * Scala \u003e= 2.12.0\n * Akka \u003e= 2.5.0\n * WebSocket transport only (no raw TCP) \n * WAMP Basic Profile only (none of the Advanced Profile features yet)\n * JSON serialization only (no MsgPack yet)\n * Not yet ready for production\n \n\n## Changelog\nPlease, read [CHANGELOG.md](CHANGELOG.md)\n\n## Contributing\nPlease, read [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Licence \nThis software comes with [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\n## Disclaimer\n\u003e This SOFTWARE PRODUCT is provided by THE PROVIDER \"as is\" and \"with all faults.\" THE PROVIDER makes no representations or warranties of any kind concerning the safety, suitability, lack of viruses, inaccuracies, typographical errors, or other harmful components of this SOFTWARE PRODUCT. There are inherent dangers in the use of any software, and you are solely responsible for determining whether this SOFTWARE PRODUCT is compatible with your equipment and other software installed on your equipment. You are also solely responsible for the protection of your equipment and backup of your data, and THE PROVIDER will not be liable for any damages you may suffer in connection with using, modifying, or distributing this SOFTWARE PRODUCT\n\n[travis-image]: https://travis-ci.org/angiolep/akka-wamp.svg?branch=master\n[travis-url]: https://travis-ci.org/angiolep/akka-wamp\n\n[codecov-image]: https://codecov.io/gh/angiolep/akka-wamp/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/angiolep/akka-wamp\n        \n[gitter-image]: https://badges.gitter.im/angiolep/akka-wamp.svg\n[gitter-url]: https://gitter.im/angiolep/akka-wamp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=body_badge\n\n[download-image]: https://api.bintray.com/packages/angiolep/universal/akka-wamp/images/download.svg\n[download-url]: https://bintray.com/angiolep/universal/download_file?file_path=akka-wamp-0.15.2.tgz\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpangiole%2Fakka-wamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpangiole%2Fakka-wamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpangiole%2Fakka-wamp/lists"}