Connecting to Apache Kafka® in Aiven
In this tutorial
Nussknacker allows creating decision scenarios on real-time data. As one way to ingest your data, you can connect directly to your Kafka and Schema Registry to read events from and write to your topics.
In this tutorial, we will explain how to connect to the Aiven from the Nussknacker Cloud and use a managed Apache Kafka as the input and output from Nussknacker.
Prerequisites
We assume that:
- You have already created the Aiven Kafka cluster
- You have already created a Nussknacker Cloud account
Setting up Aiven
- Go to Aiven console and navigate to Kafka cluster console.
- Navigate to 'Connection information' and choose SASL as authentication method (while it's possible to authenticate using client certificates, it's a bit more complex)
- You'll need data from
Apache Kafka
andSchema Registry
sections, as shown below:


Setting up Nussknacker Cloud
-
Go to Nussknacker Cloud
-
Click
Create instance
on the left panel -
Choose your instance name or use autogenerated value
-
Choose
Existing Kafka cluster
-
Fill in the following fields
- Properties:
{
"bootstrap.servers": "xxx-project.aivencloud.com:18234",
"security.protocol": "SASL_SSL",
"sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"avnadmin\" password=\"xxxxx\";",
"sasl.mechanism": "PLAIN",
"ssl.truststore.type": "PEM",
"ssl.truststore.location": "/certs/client.truststore",
"schema.registry.url": "https://xxx-project.aivencloud.com:18234",
"basic.auth.credentials.source": "USER_INFO",
"basic.auth.user.info": "avnadmin:xxxx"
}Where:
bootstrap.servers
should beService URI
from Apache Kafka tabusername
should beUser
(avnadmin
by default) from Apache Kafka tabpassword
should bePassword
from Apache Kafka tabschema.registry.url
should containService URI
from Schema Registry tab, without user and passwordbasic.auth.user.info
should containUser
andPassword
from Schema Registry tab, separated with:
- Truststore: copy
CA Certificate
from Apache Kafka tab
-
Click submit button
-
Your Nussknacker instance connected to Aiven Kafka will be created within a couple of minutes