Create a listener to listen for and accept connections from clients.
A listener handles new incoming communications requests. You can create two types of listeners:
MQTT TCP/IP listener
Allows connections from MQTT clients to be received over TCP/IP. One of the properties that you specify when the listener is created is the TCP/IP port upon which the broker will listen for connections. You can have multiple listeners on different TCP/IP ports, if required.MQTT local listener
Allows connections to be received from clients running in the same Virtual Machine (VM) that implements the Java specifications as the broker without requiring TCP/IP. MQTT local listeners are recommended when clients are running in the same VM as the broker because a local listener will consume less resources than a TCP/IP listener. Only one local listener is allowed per broker.
By default the broker creates a MQTT TCP/IP listener and a MQTT local listener on port 1883.
Use the administration API to create and delete listeners. Once you create a listener, use the administration API to perform other actions, such as getting a list of all clients connected through the listener, getting the listener name, and starting and stopping the listener.
You can immediately stop the listener or you can quiesce it to stop. When the listener is stopped immediately, it stops accepting connections and it immediately disconnects from all clients that are connected through the listener. A listener that is quiesced stops accepting new connections, but leaves all clients that are connected through the listener connected to the broker. Quiesce is a cleaner way of stopping a listener, as it allows clients to disconnect in their own time without being abruptly stopped. If a client never disconnects, the listener will never stop. You can reissue the stop request to immediately stop the listener.
Parent topic: Configuring and administering micro broker components: XPD622