devshawn/kafka-shell

Connect to Remote kafka cluster

Closed this issue · 4 comments

Hi

Can I connect to a remote Kafka cluster ( not local) using this?

Hi @dandamudi1414, it can connect to any cluster as long as you have access to it (network-wise and authentication wise) through configuration.

Here is an example connecting to a Confluent Cloud cluster.

An example kafka properties file:

bootstrap.servers=pkc-xxx.us-east-1.aws.confluent.cloud:9092
ssl.endpoint.identification.algorithm=https
sasl.mechanism=PLAIN
request.timeout.ms=20000
retry.backoff.ms=500
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="xxx" password="xxx";
security.protocol=SASL_SSL

Example kafka-shell config (~/.kafka-shell/config.yaml):

version: 1
enable:
  history: true
  save_on_exit: false
  auto_complete: true
  auto_suggest: true
  inline_help: true
  fuzzy_search: true
cluster: remote
clusters:
  remote:
    bootstrap_servers: pkc-xxx.us-east-1.aws.confluent.cloud:9092
    consumer_settings:
      config: /Users/devshawn/remote.properties
    producer_settings:
      config: /Users/devshawn/remote.properties
    admin_client_settings:
      config: /Users/devshawn/remote.properties

Thanks @devshawn for the reply i will check and get back to you .. !

** I am trying this in Windows 10 hope no issues

Hi @dandamudi1414, this tool is built upon the actual Apache Kafka command-line tools. You must install those tools, such as kafka-topics, to use it. Check out the Kafka documentation on how to install those tools :)

Sure Thank you :)