Skip to content

Instantly share code, notes, and snippets.

@edenhill
Created March 8, 2017 15:07
Show Gist options
  • Save edenhill/c6e3ae2fb8a41feca71d22f6ae79c159 to your computer and use it in GitHub Desktop.
Save edenhill/c6e3ae2fb8a41feca71d22f6ae79c159 to your computer and use it in GitHub Desktop.
golang client SSL config
c, err := kafka.NewConsumer(&kafka.ConfigMap{
"bootstrap.servers": broker,
"group.id": group,
"go.events.channel.enable": true,
"go.application.rebalance.enable": true,
"security.protocol": "ssl",
"ssl.ca.location": "/path/to/ca-cert-file",
"ssl.certificate.location": "/path/to/client.pem",
"ssl.key.location": "/path/to/client.key",
//"ssl.key.password": "maybe_a_password_if_needed",
"default.topic.config": kafka.ConfigMap{"auto.offset.reset": "earliest"}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment