Last active
September 13, 2021 17:13
-
-
Save adamkotwasinski/17161e0b54d68b75229ba241e84eb556 to your computer and use it in GitHub Desktop.
Example config for Envoy to use Kafka-mesh-filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static_resources: | |
listeners: | |
- address: | |
socket_address: | |
address: 127.0.0.1 | |
port_value: 19092 | |
filter_chains: | |
- filters: | |
# Just metrics. | |
- name: envoy.filters.network.kafka_broker | |
typed_config: | |
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker | |
stat_prefix: exampleprefix | |
# Real work. | |
- name: envoy.filters.network.kafka_mesh | |
typed_config: | |
"@type": type.googleapis.com/envoy.extensions.filters.network.kafka_mesh.v3alpha.KafkaMesh | |
advertised_host: "127.0.0.1" | |
advertised_port: 19092 | |
upstream_clusters: | |
- cluster_name: kafka_c1 | |
bootstrap_servers: kafka1n1:9092,kafka1n2:9092,kafka1n3:9092 | |
partition_count: 1 | |
- cluster_name: kafka_c2 | |
bootstrap_servers: kafka2n1:9092,kafka2n2:9092,kafka2n3:9092 | |
partition_count: 1 | |
- cluster_name: kafka_c3 | |
bootstrap_servers: kafka3n1:9092,kafka3n2:9092,kafka3n3:9092 | |
partition_count: 5 | |
producer_config: | |
acks: "1" | |
linger.ms: "500" | |
forwarding_rules: | |
- target_cluster: kafka_c1 | |
topic_prefix: app | |
- target_cluster: kafka_c2 | |
topic_prefix: a | |
- target_cluster: kafka_c3 | |
topic_prefix: b | |
admin: | |
access_log_path: /dev/null | |
profile_path: /dev/null | |
address: | |
socket_address: { address: 127.0.0.1, port_value: 9901 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment