ltm rule command MQTT session presentΒΆ

iRule(1)					  BIG-IP TMSH Manual					     iRule(1)

MQTT::session_present
       Get or set session_present flag of MQTT CONNACK message.

SYNOPSIS
       MQTT::session_present ('0' | '1')?

DESCRIPTION
       This command can be used to get or set session_present flag of MQTT message.  This command is valid only for
       following MQTT message types:

	   CONNACK

       Syntax

       MQTT::session_present [ 0 | 1 ]

       MQTT::session_present
	   * Get the session_present flag of MQTT CONNACK message.

       MQTT::session_present 0
	   * Clear the session_present flag of MQTT CONNACK message.

       MQTT::session_present 1
	   * Set the session_present flag of MQTT CONNACK message.

RETURN VALUE
       When called without an argument, this command returns the session_present flag of MQTT CONNACK message.

VALID DURING
       MQTT_CLIENT_INGRESS MQTT_SERVER_INGRESS MQTT_CLIENT_DATA MQTT_SERVER_DATA MQTT_CLIENT_EGRESS
       MQTT_SERVER_EGRESS

EXAMPLES
	# Prevent session_present from being 1
	when MQTT_SERVER_INGRESS {
	    set type [MQTT::type]
	    switch $type {
		"CONNACK" {
		    if { [MQTT::session_present] == 1 } {
			MQTT::session_present 0
		    }
		}
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-13.0.0 --First introduced the command.

BIG-IP						      2020-06-23					     iRule(1)