connect

Connect to an Apache Kafka cluster.

Use connect to associate your MSGMX session with an Apache Kafka cluster containing one or more Apache ZooKeeper and/or Quorum nodes and Apache Kafka Brokers. To be able to do this, the target service must be running, and an accessible IP address must be supplied.

Synopsis

connect <ClusterName> <host:port> [ command-config <File> ]

Required Arguments

ClusterName
A name you assign while issuing the connect command. It exists only during the connect session and provides a quick named way to identify and access a specific cluster if you are managing multiple clusters in a single MSGMX session.
host
Specify the host with either a valid hostname or a network address in the form address:port.
Caution: Apache Kafka version 2.8.0 offers an early access Metadata Quorum, however, it is not complete and should not be used in production. For details, see KIP-500: Replace ZooKeeper with a Self-Managed Metadata Quorum.

For Apache Kafka versions 2.7.0 and later, only one Apache ZooKeeper host argument is required, provided the Apache Zookeepers supporting the Kafka cluster are configured per Apache ZooKeeper Dynamic Reconfiguration practices. For more information, see the Zookeeper Dynamic Reconfiguration documentation. However, you can optionally provide additional host arguments for the other Apache ZooKeepers in the cluster, and MSGMX will try to connect to them in the order specified until it achieves a successful connection. In either case, once a connection has been made to a single Apache ZooKeeper, MSGMX can obtain the connection information for all of the other ZooKeeper nodes in that ZooKeeper cluster when using Apache Kafka 2.7.0 or later.

Note: You cannot connect to Apache ZooKeepers from different clusters using the same connect command. Also, you cannot mix ZooKeeper and Broker host/IP addresses in the same connect command.

Optional Arguments

command-config <ConfigFilename>
For a bootstrap-server connection, you can specify a credential file to provide the credentials for access to a secure bootstrap-server. These configuration properties are automatically applied to all commands run on this bootstrap-server, and are unset when disconnected from the bootstrap-server or by connecting to another bootstrap-server. If you reconnect to this server later, you must respecify the credential file.

Examples

> connect myCluster1 localhost:2181
> connect myCluster2 localhost:2181 localhost:2182 localhost:2183  command-config my_cred_file

See Also

disconnect