Managed Kafka
Connect to your Managed Kafka cluster
Connect Kafka clients to an Artie Managed Kafka cluster over TLS with SASL/SCRAM-SHA-512, using the bootstrap server and admin login from the Artie Dashboard.
What you’ll need
- A cluster that’s Ready. See Create a cluster.
- Your app’s IP address on the cluster’s IP allowlist, if you turned on Restrict access by IP.
Get the login
Open your cluster in the Artie Dashboard and go to the Connect tab.
| Field | Value |
|---|---|
| Bootstrap server | Your cluster’s address, for example mk-4f8k2q.use1-az1.kafka.aws.artie.so:9092. |
| Username | admin |
| Password | Click Show to see it. |
Clients connect over TLS with SASL/SCRAM-SHA-512. The cluster uses a public TLS certificate, so you don’t need a truststore.
Connect a client
Replace the bootstrap server with your own and <PASSWORD HERE> with your cluster’s password.
Save this as config.properties:
bootstrap.servers=mk-4f8k2q.use1-az1.kafka.aws.artie.so:9092
security.protocol=SASL_SSL
sasl.mechanism=SCRAM-SHA-512
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required \
username="admin" password="<PASSWORD HERE>";Check that it works by sending a message:
kafka-console-producer.sh --bootstrap-server mk-4f8k2q.use1-az1.kafka.aws.artie.so:9092 \
--producer.config config.properties --topic ordersType a message and press Enter. If the command hangs or times out, check that your IP address is on the cluster’s allowlist.
Using kafka-python 2.0 or later:
from kafka import KafkaProducer
producer = KafkaProducer(
bootstrap_servers="mk-4f8k2q.use1-az1.kafka.aws.artie.so:9092",
security_protocol="SASL_SSL",
sasl_mechanism="SCRAM-SHA-512",
sasl_plain_username="admin",
sasl_plain_password="<PASSWORD HERE>",
)
producer.send("orders", b"hello")
producer.flush()Topics are created automatically the first time a client writes to them, with 14 days of retention. To set partitions or retention up front, create the topic first.
Advanced
Which ports do clients use?
Clients connect to the bootstrap server on port 9092. Each broker also gets its own port, from 9093 up to 9092 plus your broker count, so 9092 to 9095 for 3 brokers and at most 9092 to 9122. Allow outbound traffic to the whole range, not only 9092, and widen it before you add brokers.
My client stopped connecting after a password change
Generating a new password stops the old one working as soon as the new one is ready. Copy the new password from the Connect tab and update every client. See Generate a new password.