You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
853 B

4 years ago
4 years ago
4 years ago
  1. # Scala Stomp Client Demo
  2. A demo of using a stomp client in Scala with an Ammonite script. Makes use of the java library [java-stomp-ws](https://github.com/gim-/java-stomp-ws) and provides two convenience extension methods. By default the script queries the websocket endpoints of [Chatto](https://git.arcusiridis.com/nova/Chatto).
  3. ## Usage
  4. You need to have [ammonite](https://ammonite.io) installed.
  5. Once you have done that, start a local instance of Chatto, and run the command -
  6. ```
  7. amm stompTest.sc --username yourusername --password yourpassword
  8. ```
  9. or
  10. ```
  11. ./stompTest.sc --username yourusername --password yourpassword
  12. ```
  13. Sample output -
  14. ```
  15. Success(true)
  16. Connected
  17. Server message: pong
  18. Server message: {"toUser":"admin","fromUser":"nova","messageContent":"hello"}
  19. ```
  20. ## License
  21. Licensed under [The Unlicense](https://unlicense.org/)