Manual Chapter : Configuring MQTT MRF Functionality

Applies To:

Show Versions Show Versions

BIG-IP LTM

  • 15.0.1, 15.0.0, 14.1.2, 14.1.0, 14.0.1, 14.0.0
Manual Chapter

Configuring MQTT MRF Functionality

Overview: Creating an MQTT MRF configuration

You can use a Message Queuing Telemetry Transport (MQTT) Message Routing Framework (MRF) configuration to optimize performance and bandwidth. When creating a MQTT MRF configuration, in order to use the MRF proxy, you need to configure an MQTT Session profile. You create an MQTT Session profile to customize settings for client-side and server-side MQTT connection properties. These are attached to a virtual server that controls a client-side session, or attached via an optional Transport Config profile to control a server-side session.

The high performance MRF is a protocol independent extension to the BIG-IP system hudproxy to support message based protocols. It is designed to deliver messages to the best route using protocol specific routing helper functions.

Complete these tasks to configure the BIG-IP system to use MQTT MRF functionality.

Create an MQTT monitor

You can create an MQTT monitor to monitor MQTT brokers that are configured as pool members in an LTM pool.
  1. Click Create.
    The New Monitor screen opens.
  2. In the Name field, type a name for the monitor.
  3. From the Type list, select MQTT.
    The screen refreshes, and displays the configuration options for the MQTT monitor type.
  4. From the Configuration list, select Advanced.
    This selection makes it possible for you to modify additional default settings.
  5. Optional: In the Interval field, type a number that indicates, in seconds, how frequently the system issues the monitor check.
    The default is 5 seconds.
  6. Optional: To specify a different interval for health checking, from the Up Interval list, select Enabled, and, in the Up Interval field, type the number of seconds for the interval.
    The default is Disabled.
  7. Optional: In the Time Until Up field, type the number of seconds to wait after a resource first responds correctly to the monitor before setting the resource to up.
    The default is 0 seconds.
  8. Optional: In the Timeout field, type the number of seconds that the target has in which to respond to the monitor request.
    The default is 16 seconds.
  9. Optional: To specify that you must manually re-enable the resource after an unsuccessful monitor check, for Manual Resume, select Yes.
    The default is No.
  10. Optional: From the MQTT Version list, select the protocol version that the monitor will use to communicate with the monitoring object.
    The default is 3.1.1.
  11. Optional: In the Client ID field, type the Client ID that the monitor will send to communicate with the monitoring object.
  12. Optional: If the monitored object requires authentication, type a User Name.
  13. Optional: If the monitored target requires authentication, type a Password.
  14. Optional: In the Alias Address field, type an alias IP address for the monitor to check, on behalf of the pools or pool members with which the monitor is associated.
    The default is * All Addresses.
  15. Optional: In the Alias Service Port field, type an alias port or, from the Alias Service Port list, select a service for the monitor to check, on behalf of the pools or pool members with which the monitor is associated.
    The default is * All Ports.
  16. Click Finished.

Create a pool

Before you can assign an MQTT health monitor to a pool, you need to create the MQTT monitor.
You can create a pool of servers that you can group together to receive and process traffic. After the pool is created, you can associate the pool with a virtual server.
  1. On the Main tab, click Local Traffic > Pools .
    The Pool List screen opens.
  2. Click Create.
    The New Pool screen opens.
  3. In the Name field, type a unique name for the pool.
  4. Optional: For the Health Monitors setting, select an MQTT health monitor from the Available field, and move it to the Active field.
  5. For each pool member, in the New Members setting, select one of the options, and then follow the steps to configure the applicable settings.
    Option Steps
    New Node
    1. In the Node Name field, type a name for the node portion of the pool member.
    2. In the Address field, type the IP address of the server.
    3. For the Service Port setting, type one of the following port numbers, or select one of the following services from the list.
      Port Number Service Name
      1883 MQTT. The Internet Assigned Numbers Authority (IANA) registered port for MQTT service.
      8883 MQTT-TLS. The IANA registered port for secure MQTT service over a Transport Layer Security (TLS) network.
    4. Click Add.
    New FQDN Node
    1. In the Node Name field, type a name for the node portion of the pool member.
    2. In the FQDN field, type the FQDN of the server.
      Note: To use FQDNs instead of IP addresses, you should still type at least one IP address. Typing one IP address ensures that the system can find a pool member if a DNS server is not available.
    3. For the Service Port setting, type one of the following port numbers, or select one of the following services from the list.
      Port Number Service Name
      1883 MQTT. The Internet Assigned Numbers Authority (IANA) registered port for MQTT service.
      8883 MQTT-TLS. The IANA registered port for secure MQTT service over a Transport Layer Security (TLS) network.
    4. From the Auto Populate list, select Enabled to automatically create ephemeral nodes, using the IP addresses returned by the resolution of a DNS query for the pool member defined by the FQDN.
    5. Click Add.
  6. Click Finished.
    The screen refreshes, and you see the new pool in the Pool list.

Create an MQTT Session profile

You can create an MQTT Session profile to customize settings for client-side and server-side MQTT connection properties.
  1. On the Main tab, click Local Traffic > Profiles > Message Routing > MQTT .
    The MQTT list screen opens.
  2. Click Create.
    The New MQTT Session profile screen opens.
  3. In the Name field, type a unique name for the MQTT session profile.
  4. From the Parent Profile list, select a profile from which the new profile inherits properties.
  5. Select the Custom check box.
  6. In the Settings area, for the Client ID Prefix field, type a prefix to add to the client-id for the server-side connection.
  7. For the Keepalive Interval setting, retain the default, or type a value for the MQTT CONNECT message on the server-side connection.
    The default is 60 seconds.
  8. If you want to use peered client-side and server-side connections, select the Peered Session Mode check box.
    The default is not to use peered connection (the checkbox is cleared); the BIG-IP system uses the MQTT message routing.
  9. In the Proxy Topic Prefix field, type a prefix to add to the MQTT topics sent on the server-side connection.
  10. From the Client Will Handling Mode list:
    • To disable forwarding of the client will message, select Ignore.
    • To control the will action for the ungraceful shutdown of the client-side connection, retain the default.
    The default is Send-Local-Copy.
  11. From the Server Will Handling Mode list:
    • To exclude the server side connection, select Ignore.
    • To control the will action for the ungraceful shutdown of the server-side connection, retain the default.
    The default is Copy-From-Client.
  12. Click Finished.
    The screen refreshes, and you see the new MQTT session profile in the MQTT list.

Optional: Create a MQTT Transport Config profile

You can create an MQTT Transport Config profile to configure server-side connection attributes.
  1. On the Main tab, click Local Traffic > Profiles > Message Routing > MQTT .
    The MQTT list screen opens.
  2. Click Transport Config.
    The Transport Config list screen opens.
  3. Click Create.
    The New Transport Config screen opens.
  4. In the Name field, type a unique name for the Transport Config profile.
  5. For the Profiles setting, select the profile(s) you want from the Available list, and move it to the Selected field.
  6. For the iRules setting, select the name of the server-side iRule from the Available list, and move it to the Selected list.
  7. Retain the default settings for the remaining settings in the Configuration area.
  8. Click Finished.
    The screen refreshes, and you see the new Transport Config profile in the Transport Config list.

Create a MQTT Peer profile

Before you can create a MQTT Peer profile, first verify that you have created a pool and a MQTT Transport Config profile.
You can create a MQTT Peer profile to specify a pool of servers and a Transport Config to use for the pool.
  1. On the Main tab, click Local Traffic > Profiles > Message Routing > MQTT .
    The MQTT list screen opens.
  2. Click Peers.
    The Peers list screen opens.
  3. Click Create.
    The New Peer screen opens.
  4. In the Name field, type a unique name for the Peer profile.
  5. From the Pool list, select the name of the pool you created previously.
  6. From the Transport Config list, select the name of the Transport Config you created previously.
  7. Click Finished.
    The screen refreshes, and you see the new Peer profile in the Peers list.

Create an MQTT Static Route profile

Before you can create an MQTT Static Route profile, verify you have created a virtual server and a MQTT Peer profile.
You can create an MQTT Static Route profile to create a route to the peer for traffic coming to a virtual server.
  1. On the Main tab, click Local Traffic > Profiles > Message Routing > MQTT .
    The MQTT list screen opens.
  2. Click Static Routes.
    The Static Routes list screen opens.
  3. Click Create.
    The New Route screen opens.
  4. In the Name field, type a unique name for the Route profile.
  5. From the Virtual Server list, select the name of the virtual server you created previously.
  6. From the Peer list, select the name of a peer you created previously.
  7. Click Finished.
    The screen refreshes, and you see the new Route profile in the Static Routes list.

Create an MQTT Router profile

Before you can create an MQTT Router profile, verify you have created a MQTT Static Route profile.
You can create an MQTT Router profile to select a static route.
  1. On the Main tab, click Local Traffic > Profiles > Message Routing > MQTT .
    The MQTT list screen opens.
  2. On the menu bar, click Router Profiles.
    The Router Profiles list screen opens.
  3. Click Create.
    The New MQTT Session profile screen opens.
  4. In the Name field, type a unique name for the Router profile.
  5. Configure settings as needed.
  6. From the Static Route list, select the name of a static route you created previously.
  7. Click Finished.
    The screen refreshes, and you see the new Router profile in the Router Profiles list.

Create a virtual server for MQTT

Before creating a virtual server, verify that you have created the pool to which you want this virtual server to send traffic.
When you create a virtual server, you specify a destination IP address and service port. All other settings on the virtual server have default values. You can change the default values of any settings to suit your needs.
  1. On the Main tab, click Local Traffic > Virtual Servers .
    The Virtual Server List screen opens.
  2. Click the Create button.
    The New Virtual Server screen opens.
  3. In the Name field, type a unique name for the virtual server.
  4. From the Type list, for the virtual type, select Message Routing.
  5. In the Destination Address/Mask field:
    • If you want to specify a single IP address, confirm that the Host button is selected, and type the IP address in CIDR format.
    • If you want to specify multiple IP addresses, select the Address List button, and confirm that the address list that you previously created appears in the box.
    The supported format is address/prefix, where the prefix length is in bits. For example, an IPv4 address/prefix is 10.0.0.1 or 10.0.0.0/24, and an IPv6 address/prefix is ffe1::0020/64 or 2001:ed8:77b5:2:10:10:100:42/64. When you use an IPv4 address without specifying a prefix, the BIG-IP system automatically uses a /32 prefix.
    Note: The IP address or addresses for this field must be on the same subnet as the external self-IP address.
  6. In the Service Port field, type one of these two port numbers, or select one of the two services from the list.
    Port Number Service Name
    1883 MQTT. The Internet Assigned Numbers Authority (IANA) registered port for MQTT service.
    8883 MQTT-TLS. The IANA registered port for secure MQTT service over a Transport Layer Security (TLS) network.
  7. In the Configuration list, retain the default, Basic.
  8. For the SSL Profile (Client) setting, from the Available list, select the name of the Client SSL profile you previously created and move the name to the Selected list.
  9. From the Application Protocol list, select MQTT.
  10. From the Session Profile list, select the name of a MQTT Session profile that you created previously.
  11. From the Router Profile list, select the name of a MQTT Router profile that you created previously.
  12. Configure any other settings that you need.
  13. In the Resources area, for the iRules setting, from the Available list, select the name of the iRule that you want to assign, and move the name into the Enabled list.
  14. Click Finished.
You now have a virtual server that listens for application traffic and acts according to the values configured within the virtual server.