Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
#803 - Add support for MQTT testing
MQTT Endpoints are similar to DNS Endpoints in that they are recognized by the presence of an
mqtt
config block. This enables the endpoint to be configured with the required topic and the optional username/password. The check will subscribe to the topic and wait for a message to come in that contains a payload that matches the BODY. While the check is waiting for incoming messages it will public a message containing the BODY as the payload. If the subscription gets the message containing the body= before the timeout publish, CONNECTED will be set to true. Otherwise, it will be false. The body can also be a text/template with support for auuidv4
function. This enables the body to be specified likegatus check - {{ uuidv4 }}
and ensures that the subscription is getting the message that was just published.@TwiN Can you give me feedback on this PR?
Checklist
README.md
, if applicable.@zdzichu Here is an implementation of MQTT checking