You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Publish request and response logs to an Apache Kafka topic with the Kafka Log plugin
how_to
text
url
Authentication
/gateway/authentication/
gateway
kafka-log
on-prem
konnect
gateway
3.4
plugin
service
route
consumer
authentication
q
a
How do I authenticate Consumers with basic authentication?
Create a Consumer with a username and password in the `basicauth_credentials` configuration. Enable the Basic Authentication plugin globally, and authenticate with the base64-encoded Consumer credentials.
deck
entities
inline
services
routes
example-service
example-route
title
content
Apache Kafka
In this tutorial, we'll be using Apache Kafka:
1. Install Apache Kafka.
2. Get the Kafka Docker image:
```sh
docker pull apache/kafka-native:4.0.0
docker run -d --name kafka --network kong-quickstart-net -p 9092:9092 apache/kafka-native:4.0.0
```
inline
title
include_content
icon_url
Clean up Konnect environment
cleanup/platform/konnect
/assets/icons/gateway.svg
title
include_content
icon_url
Destroy the {{site.base_gateway}} container
cleanup/products/gateway
/assets/icons/gateway.svg
Create Kafka topic
Save the path to /bin/kafka-topics as an environment variable:
Since the topic can vary in production instances, set the Kafka topic as an environment variable:
export DECK_KAFKA_TOPIC=kong-log
2. Enable the Kafka Log plugin
Set the host.docker.internal as your host. We're using this as our host in this tutorial because {{site.base_gateway}} is using localhost and both {{site.base_gateway}} and Kafka are in Docker containers.