How to
Connect Using kcat CLI
kcat is a generic command line non-JVM
producer and consumer for Apache Kafka. You can connect to your Upstash Kafka
cluster using kcat
.
If you do not have a Kafka cluster and/or topic already, follow these steps to create one.
In the cluster details section of the Upstash Console copy bootstrap endpoint, username and password. Then replace following parameters in the code snippets below with the actual values you copied earlier.
$BOOTSTRAP_ENDPOINT
$UPSTASH_KAFKA_USERNAME
$UPSTASH_KAFKA_PASSWORD
$GROUP_ID
$TOPIC_NAME
Query cluster metadata:
Produce a message:
Fetch messages:
Consume messages using consumer groups:
For more information see kcat repository.
Was this page helpful?