MR::message

Description

The MR::message commands returns or sets details in the message routing table. See subcommand details below.

Syntax

MR::message route
MR::message route none
MR::message route peer [<peer_name> [<peer_name>]]
MR::message route [[virtual <virtual_name>] OR [config <config_name>]] [[host <host tuple>] OR [pool <pool_name>]]
MR::message drop <reason>
MR::message status
MR::message originator
# v11.6+
MR::message lasthop
MR::message nexthop none
MR::message nexthop [<new_nexthop>]
MR::message retry_count
# v13+
MR::message attempted none
MR::message attempted [[virtual <virtual_name>] OR [config <config_name>]] [[host <host tuple>]
MR::message route <peer-selection-mode | selection-mode | mode> <sequential | seq | ratio> peer <peer_name> [<peer_name>]

# v13.1+
MR::message route <peer-selection-mode | selection-mode | mode> <sequential | seq | ratio> peer <peer_name> [<peer_name>]
  [connection-mode <per-peer | per-blade | per-tmm | per-client> | <per-client-per-blade> | <per-client-per-tmm> | <per-peer-alternate-tmm> | <per-client-alternate-tmm>]
  [max-connections <nonnegative_integer>]

# v14+
MR::message clone [<clone-id>] [-count <clone-count>]
MR::message clone_count
MR::message clone_id
MR::message clone_id_request
MR::message existing_connections_only [<boolean>]
MR::message outgoing_connection_instance_seed [<nonnegative-integer>]
MR::message pick_host peer <peer-object-name> [carp <carp-key]
MR::message pick_host pool <pool-object> [config <transport-config>] [carp <carp-key>]

# v14.1+
MR::message new_connection_only [boolean]

# v??
MR::message snat <none | automap | address <addr>:[<port>]>

# V16.1+
MR::message priority [<priority>]

MR::message lasthop

Note: Added in BIGIP-11.6

  • Returns the message’s lasthop (details of the connection that originated the message). The lasthop is presented as “TMM number”:”FlowID” for example 0:800000000005

MR::message nexthop none

  • Clears the nexthop already set in the message.

MR::message nexthop [<new_nexthop>]

Note: Added in BIGIP-11.6

  • Returns the nextop nexthop (details of the connection the message is to be forwarded to). If the new_nexthop parameter is present, a nexthop may be set for the message. The nexthop is formated as “TMM number”:”FlowID” for example 0:800000000029

MR::message originator

  • Returns the transport type, transport name and IP and port of the originator of the message.

MR::message route

  • Returns a rendering of the mr_egress selected for this message.

MR::message route none

  • Clear any route already set in the message

MR::message route peer [<peer_name> [<peer_name>]]

  • Instructs the route table to route the message to the provided peer list. This form of the MR::message route command takes the names of configured peers or dynamic peers created via the MR::peer command.

MR::message route [[virtual <virtual_name>] OR [config <config_name>]] [[host <host tuple>] OR [pool <pool_name>]]

  • Instructs the route table to route the message to the provided host or pool. (Peer-selection-mode added in v13. Connection-mode and max-connections added in v13.1.)

MR::message attempted none

  • Clear any attempted hosts already set in the message. (added in v13)

MR::message attempted [[virtual <virtual_name>] OR [config <config_name>]] [[host <host tuple>]

  • Sets the attempted hosts list. If set before routing the message (during MR_INGRESS or MR_EGRESS) a host will be selected from the pool that has not already been attempted. (added in v13) =====MR::message drop <reason>=====

  • Drops the current message

MR::message retry_count

Note: Added in BIGIP-11.6

  • Returns the number of attempts to route this message that have occurred.

MR::message status

  • Returns the status of the routing operation (valid only at MR_EGRESS). Possible values are:
    • “unprocessed”
    • “route found”
    • “no route found”
    • “dropped”
    • “queue_full”
    • “no connection”
    • “connection closing”
    • “internal error”
    • “persist key in use”
    • “standby dropped”

MR::message clone <clone-id>

  • Clones the message a number of times (one for each CLONE_ID) and dispatches each cloned message as ingress. After the original message has completed the event in which this command is executed, each cloned message executes the MR_INGRESS iRule event for itself. (CLONE_ID)+ can be one or more strings separated by space. Protection against infinite loops should be considered! Returns the clone_count, see below, (allowed only at MR_INGRESS).

MR::message clone -count <clone-count>

  • Clones the message CLONE_COUNT number of times and dispatches each cloned message as ingress. After the original message has completed the event in which this command is executed, each cloned message executes the MR_INGRESS iRule event for itself. Clone IDs of cloned messages will be automatically assigned to: (clone_count_before + 1), (clone_count_before + 2), …, (clone_count_before + CLONE_COUNT). Protection against infinite loops should be considered! Returns the clone_count, see below, (allowed only at MR_INGRESS).

MR::message clone_count

  • Returns the number of clones of this message (including the original). Returns 0 if there are no clones of this message.

MR::message clone_id

  • Returns the clone id of the current message. Returns empty string for original message.

MR::message clone_id_request

  • For Requests and Messages: Acts the same as clone_id.
  • For Responses: Returns the clone id of the request this response belongs to.

MR::message existing_connections_only [<boolean>]

  • Gets or sets a flag that instructs the MRF to only forward the message using existing connections, and if a connection to the selected host does not exist then the route will fail.

MR::message outgoing_connection_instance_seed [<nonnegative-integer>]

  • Gets or if been set by this iRule then this seed will be used to generate the connection instance number instead of this generated by some internal originating connection id. (See MR::connection_instance iRule command).

MR::message pick_host peer <peer-object-name> [carp <carp-key>]

  • Returns a host picked from pool specified in the peer. If carp key is specified, it uses CARP algorithm to compute the host. If no carp key is specified, it uses LB algorithm of the pool object specified on peer object to return the host. The returned value can be used to set the host of MR::message route command.

MR::message pick_host pool <pool-object> [config <transport-config>] [carp <carp-key>]

  • Returns a host picked from pool specified in the peer. If carp key is specified, it uses CARP algorithm to compute the host. If no carp key is specified, it uses LB algorithm of the pool object specified on peer object to return the host. The returned value can be used to set the host of MR::message route command.

MR::message new_connection_only [boolean]

  • Gets or sets a flag that instructs the MRF to create a new connection for this message. This connection will not be reused for other messages but will remain until it expires to receive any responses.

MR::message snat <none | automap | address <addr>:[<port>]>

  • none: source address translation is discarded
  • automap: causes the system to assign the configured self IP to the serverside connection(s)
  • address: causes the system to assign the specified source address to the serverside connection(s)

MR::message priority [<priority>]

  • Gets/sets the priority of/for this message. This integer will be one of the factors to rate limit the traffic in MRF.

Examples

 when MR_INGRESS {
     if {[GENERICMESSAGE::message is_request] != 0} {
         MR::message route config tcp_tc host 10.10.10.34:1234
     }
 }
 when MR_EGRESS {
     if {[GENERICMESSAGE::message is_request] != 0} {
         set orig_lasthop [MR::message lasthop]
     } else {
         MR::message nexthop "$orig_lasthop"
     }
 }

# Example 1
 when MR_INGRESS {
     if {[GENERICMESSAGE::message is_request] != 0} {
         set host [MR::message pick_host peer /Common/mypeer]
         MR::message route config tcp_tc host $host
     }
 }

 # Example 2
 when MR_INGRESS {
     if {[GENERICMESSAGE::message is_request] != 0} {
         set host [MR::message pick_host peer /Common/mypeer carp [IP::client_addr]]
         MR::message route config tcp_tc host $host
     }
 }