messages-api
Simple API that use Go, MQTT for a simple messaging API
1. Ensure Go and MQTT installed on your computer
2. type `make run` / `go run main.go` to run the program or `make test` / `go test -v ./...` to test the program
localhost:8080/message/{message}
localhost:8080/message
Server act as a publisher and a subscriber with mqtt server.
Default address for mqtt : `mqtt://<username>:<password>@<address>:<port>/<topic>`.
Address mqtt in mylocal : `mqtt://mqtt_user_name:mqtt_password@localhost:1883/message-api-realtime`.
subscriber clientID : `sub`
publisher clientID : `pub`
When server receiving GET request for sending message, the publisher will publish the body of the message and the subscriber will receive the message.