Docker compose file for testing the Retained Message Query Plugin with HiveMQ CE and HiveMQ Enterprise.
docker-compose -f docker-compose-ce.yml up
docker-compose -f docker-compose-ee.yml up
- check plugin
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
curl --header "Content-Type: application/json" \ --request POST \ --data '{"number":1}' \ http://localhost:3000/publish
- check plugin
curl --header "Content-Type: application/json" \ --request POST \ --data '{"topic":"topic","depth":2}' \ http://localhost:8080/query
- Endpoint:
POST /publish
- Body:
{ "number": "number of messages to publish, required (Integer)", "qos": "quality of service, optional, default=2 (Integer)", "retain": "retain flag, optional, default=true (Boolean)" }
The retained message query plugin logs all retained messages received when HIVEMQ_LOG_LEVEL=DEBUG
is set.