Apache Kafka
Configuration for a LangStream streaming instance.
Configuration
To connect to a Kafka Broker, provide the address of the broker with the bootstrap.servers
property.
Please refer to the Apache Kafka Java client documentation(external link) for more details about the configuration properties.
Authentication
Usually in Apache Kafka you would provide Authentication using the JAAS configuration file, but in LangStream you can provide the configuration directly in the instance.yaml file.
security.protocol: the security protocol to use, for example SASL_SSL
sasl.jaas.config: the JAAS configuration to use for authentication
sasl.mechanism: PLAIN
session.timeout.ms: "45000"
Examples
This is a configuration for a Kafka instance without authentication, on PLAINTEXT connections:
This is how it looks like when you use SASL_SSL for authentication:
Please always use secrets to store sensitive information like passwords and usernames.
Using Apache Kafka in "docker run"
When you are running you application in Docker mode, you can use the default Kafka instance provided by the LangStream docker image, and you don't need to provide any configuration.
Last updated