connect

Connect to an Apache Kafka cluster.

Use the connect command to associate your MSGMX session with a cluster containing one or more Apache ZooKeeper 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> <host1 | host2 | etc.> [ command-config <File> ]

Required Arguments

ClusterName
A name you assign while issuing the connect command. The name exists during only the connect session and provides a quick named way to 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 in the form address:port.

For Apache Kafka versions earlier than 2.4, you must provide a host argument for each Apache ZooKeeper in the cluster. If you specify only a single ZooKeeper, your changes will still be propagated across the ZooKeeper cluster but if that specific ZooKeeper becomes unresponsive or unreachable, you will no longer be able to manage the ZooKeeper-configured aspects of your Kafka installation.

For Apache Kafka versions 2.4.0 or later, only one Apache ZooKeeper host argument is required, provided the Apache Kafka cluster is configured per best practices. However, you can optionally provide additional host arguments for other Apache ZooKeepers in the cluster, and MSGMX will try them in order 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 ZooKeeper nodes in that ZooKeeper cluster when using Apache Kafka 2.4.0 or later.

Note: You cannot connect to Apache ZooKeepers from different clusters using the same connect command. Also, you cannot include 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 parameters are automatically applied to all commands executed 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 re-specify the credential file.

Example

> connect myCluster1 localhost:2181
> connect myCluster2 localhost:2181 localhost:2182 localhost:2183

See Also

disconnect