ltm rule command MQTT disconnect
iRule(1) BIG-IP TMSH Manual iRule(1)
MQTT::disconnect
Disconnect the MQTT connection.
SYNOPSIS
MQTT::disconnect
DESCRIPTION
This command disconnects the MQTT connection.
Syntax
MQTT::disconnect
RETURN VALUE
VALID DURING
MQTT_CLIENT_INGRESS MQTT_CLIENT_DATA MQTT_SERVER_INGRESS MQTT_SERVER_DATA MQTT_CLIENT_EGRESS
MQTT_SERVER_EGRESS
EXAMPLES
#Example: Prohibit PUBLISH payloads with blocked keywords defined in
#blacklisted_keywords_datagroup in first 200 bytes
#
when MQTT_CLIENT_INGRESS {
set type [MQTT::type]
switch $type {
"PUBLISH" {
if { [class exists blacklisted_keywords_datagroup] } {
MQTT::collect 200
}
}
}
}
when MQTT_CLIENT_DATA {
set type [MQTT::type]
switch $type {
"PUBLISH" {
set payload [MQTT::payload]
MQTT::release
set found [class match $payload contains blacklisted_keywords_datagroup]
if { $found != "" } {
MQTT::disconnect
}
}
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-13.0.0 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)