Chapter 6. Network Connections


Connections define how the router communicates with clients, other routers, and brokers. You can configure incoming connections to define how the router listens for data from clients and other routers, and you can configure outgoing connections to define how the router sends data to other routers and brokers.

6.1. Listening for Incoming Connections

Listening for incoming connections involves setting the host and port on which the router should listen for traffic.

Procedure

  1. In the router’s configuration file, add a listener:

    listener {
        host: HOST_NAME/ADDRESS
        port: PORT_NUMBER/NAME
        ...
    }
    host
    Either an IP address (IPv4 or IPv6) or hostname on which the router should listen for incoming connections.
    port
    The port number or symbolic service name on which the router should listen for incoming connections.

    For information about additional attributes, see listener in the qdrouterd.conf man page.

  2. If necessary, secure the connection.

    If you have set up SSL/TLS or SASL in your environment, you can configure the router to only accept encrypted or authenticated communication on this connection.

  3. If you want the router to listen for incoming connections on additional hosts or ports, configure an additional listener entity for each host and port.

6.2. Adding Outgoing Connections

Configuring outgoing connections involves setting the host and port on which the router connects to other routers and brokers.

When a router connects to a broker, the broker might provide backup connection data that the router can use if the primary connection fails. If the primary connection fails, the router attempts to reconnect by using a combination of the primary and — if provided — backup connections in round-robin fashion until the connection is successful. For more information about viewing the backup connection data provided by the broker, see Section 10.3.2.2, “Managing Connectors”.

Procedure

  1. In the router’s configuration file, add a connector:

    connector {
        name: NAME
        host: HOST_NAME/ADDRESS
        port: PORT_NUMBER/NAME
        ...
    }
    name
    The name of the connector. You should specify a name that describes the entity to which the connector connects. This name is used by configured addresses (for example, a linkRoute entity) in order to specify which connection should be used for them.
    host
    Either an IP address (IPv4 or IPv6) or hostname on which the router should connect.
    port
    The port number or symbolic service name on which the router should connect.

    For information about additional attributes, see connector in the qdrouterd.conf man page.

  2. If necessary, secure the connection.

    If you have set up SSL/TLS or SASL in your environment, you can configure the router to only send encrypted or authenticated communication on this connection.

  3. For each remaining router or broker to which this router should connect, configure an additional connector entity.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.