Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artcom/retained-message-query-plugin-test
https://github.com/artcom/retained-message-query-plugin-test
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/artcom/retained-message-query-plugin-test
- Owner: artcom
- License: mit
- Created: 2023-12-04T09:42:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-06T13:19:35.000Z (about 1 year ago)
- Last Synced: 2024-11-07T06:36:21.540Z (3 months ago)
- Language: Dockerfile
- Size: 77.1 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Retained Message Query Plugin Test
Docker compose file for testing the Retained Message Query Plugin with HiveMQ CE and HiveMQ Enterprise.
## Usage
### HiveMQ Community Edition
```bash
docker-compose -f docker-compose-ce.yml up
```### HiveMQ Enterprise Edition
```bash
docker-compose -f docker-compose-ee.yml up
```### All
- check plugin
```bash
curl --header "Content-Type: application/json" \
--request POST \
--data '{"topic":"topic","depth":2}' \
http://localhost:8080/query
```
- send a message to the broker through the docker network
```bash
curl --header "Content-Type: application/json" \
--request POST \
--data '{"number":1}' \
http://localhost:3000/publish
```
- check plugin
```bash
curl --header "Content-Type: application/json" \
--request POST \
--data '{"topic":"topic","depth":2}' \
http://localhost:8080/query
```## Retained Message Generator API
### Publish a message
- Endpoint: `POST /publish`
- Body:
```json
{
"number": "number of messages to publish, required (Integer)",
"qos": "quality of service, optional, default=2 (Integer)",
"retain": "retain flag, optional, default=true (Boolean)"
}
```## Logs
The retained message query plugin logs all retained messages received when `HIVEMQ_LOG_LEVEL=DEBUG` is set.