connect

Connect to an Apache ZooKeeper node or Apache Kafka Broker.

Use the connect command to associate your MSGMX session with one or more Apache ZooKeeper nodes or 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 zookeeper <hostname | address:port>

connect bootstrap-server <hostname | address:port> [command-config <ConfigFilename>]

Required Arguments

server-type <hostname | address:port>
connection destination

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.

Examples

> connect zookeeper localhost:2181
zookeeper@localhost:2181>

> connect bootstrap-server localhost:9092
bootstrap-server@localhost:9092>

> connect bootstrap-server localhost:9093 command-config ../sample.plaintext.command-config
bootstrap-server@localhost:9093>

> connect bootstrap-server localhost:9092 command-config ../sample.ssl.command-config
bootstrap-server@localhost:9092>

Sample plain text configuration file:

sasl.mechanism=PLAIN
request.timeout.ms=20000
bootstrap.servers=localhost:9092
retry.backoff.ms=500

sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
   username="admin" \
   password="admin-secret";

security.protocol=SASL_PLAINTEXT

Sample SSL configuration file:

security.protocol=SSL
ssl.truststore.type=JKS
ssl.keystore.type=JKS
ssl.truststore.location=<client_trustore_location>
ssl.truststore.password=test1234

See Also

disconnect