Repository navigation
Expand file tree
/
Copy pathexample.config.yaml
More file actions
185 lines (175 loc) · 7.56 KB
/
Copy pathexample.config.yaml
File metadata and controls
185 lines (175 loc) · 7.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
clusters:
# Logical name referenced by bridges[].from.cluster / bridges[].to.cluster.
cluster_a:
# Required: Kafka bootstrap brokers for this cluster.
brokers:
- '127.0.0.1:9092'
# Optional: create bridge from/to topics on this cluster at startup (default false).
# auto_create_topics: true
# Optional TLS block. Omit to use defaults (tls.enabled=false).
# tls:
# enabled: true
# # Optional: CA bundle to validate broker certificates.
# ca_file: "/path/to/ca.pem"
# # Optional: client certificate for mutual TLS (must be set with key_file).
# cert_file: "/path/to/client.pem"
# # Optional: private key for mutual TLS (must be set with cert_file).
# key_file: "/path/to/client-key.pem"
# Optional SASL block. Omit to use defaults (mechanism=none).
# sasl:
# mechanism: "scram-sha-256" # none | plain | scram-sha-256 | scram-sha-512
# # Required for plain/scram mechanisms:
# username: "user"
# password: "secret"
# Optional shared client tuning (applies to both producer and consumer clients).
# client:
# # Optional client id sent to Kafka.
# client_id: "bifrost-cluster-a"
# # Optional TCP dial timeout (Go duration format).
# dial_timeout: "15s"
# # Optional overhead added to request deadlines (Go duration format).
# request_timeout_overhead: "10s"
# # Optional max bytes written in a single broker write.
# # Must be >= producer.batch_max_bytes when both are set.
# broker_max_write_bytes: 16777216
# # Optional max bytes read in a single broker read.
# # Must be >= consumer.fetch_max_bytes when both are set.
# broker_max_read_bytes: 52428800
# Optional consumer tuning for from-side bridge clients.
# consumer:
# # Optional total fetch bytes cap.
# # Must be >= fetch_max_partition_bytes when both are set.
# fetch_max_bytes: 52428800
# # Optional per-partition fetch bytes cap.
# fetch_max_partition_bytes: 10485760
# # Optional max broker wait time per fetch request (Go duration).
# fetch_max_wait: "500ms"
# # Optional consumer group session timeout (Go duration).
# session_timeout: "45s"
# # Optional heartbeat interval (Go duration). Must be < session_timeout.
# heartbeat_interval: "3s"
# # Optional rebalance timeout (Go duration). Must be >= session_timeout.
# rebalance_timeout: "60s"
# # Optional isolation level: read_uncommitted (default) or read_committed.
# isolation_level: "read_uncommitted"
# # Optional retry policy for source offset commits after a successful produce.
# # Retries continue in-place until success or shutdown/cancellation.
# # Defaults when omitted: min_backoff=1s, max_backoff=30s, jitter=250ms.
# commit_retry:
# min_backoff: "1s"
# max_backoff: "30s"
# jitter: "250ms"
# Optional producer tuning for to-side bridge clients.
# producer:
# # Optional acks mode: all (default), leader, none.
# required_acks: "all"
# # Optional max batch size before compression.
# batch_max_bytes: 1048576
# # Optional compression: snappy, zstd, lz4, gzip, none.
# batch_compression: "snappy"
# # Optional producer linger duration. Good high-throughput default is 5ms.
# linger: "5ms"
# # Optional produce request timeout.
# produce_request_timeout: "30s"
# # Optional: disable idempotent writes.
# disable_idempotent_write: false
# # Optional retry policy for destination produce failures.
# # Retries continue in-place until success or shutdown/cancellation.
# # Defaults when omitted: min_backoff=1s, max_backoff=30s, jitter=250ms.
# retry:
# min_backoff: "1s"
# max_backoff: "30s"
# jitter: "250ms"
cluster_b:
brokers:
- '127.0.0.1:9094'
# TLS and SASL are omitted here; defaults are tls.enabled=false and sasl.mechanism=none.
bridges:
# One directional relay route from cluster_a/incoming to cluster_b/outgoing.
- name: 'a-to-b'
from:
# Required source cluster key (must exist under clusters).
cluster: 'cluster_a'
# Required source topic.
topic: 'incoming'
to:
# Required destination cluster key (must exist under clusters).
cluster: 'cluster_b'
# Required destination topic.
topic: 'outgoing'
# Optional: relay goroutines for this bridge. Omit or set 0 for automatic sizing from the
# from.topic partition count (after topic ensure), with host-based caps and fair-sharing across
# bridges. Set a positive integer to fix the replica count explicitly.
# replicas: 4
# Optional: maximum records to relay at once from one source topic-partition. Omit or set 1
# to disable batching. Produce and commit still happen in order per source partition.
# batch_size: 1
# Optional: max concurrently produced batches per replica.
# Omit/0 uses elastic default (8).
# max_in_flight_batches: 8
# Optional: commit acknowledged offsets at this interval (Go duration).
# Omit/0 uses elastic default (200ms).
# commit_interval: "200ms"
# Optional: commit acknowledged offsets when this many records are pending.
# Omit/0 uses elastic default (1000).
# commit_max_records: 1000
# Optional: force all produced records for this bridge onto one destination partition. When
# omitted, bifrost preserves the source partition number on each record. If set, the
# destination topic must contain that partition index.
# override_partition: 0
# Optional: replace the Kafka key on every produced record for this bridge with a fixed string.
# override_key: 'static-key'
# Optional consumer group. Defaults to "bifrost-<sanitized bridge name>" when omitted.
# consumer_group: "bifrost-a-to-b"
# Optional: produced-record Kafka headers (course hash, structured source coords, propagation, extras).
# headers:
# extra:
# env: 'prod'
# my_trace: 'abc'
# source:
# enabled: true
# # compact (default) = bifrost.course.hash only; verbose = hash + bifrost.source.* tuple.
# format: compact
# propagate: true
# Deprecated: same as headers.extra when it is the only map; must match headers.extra if both appear.
# extra_headers:
# env: 'prod'
metrics:
# Enable/disable Prometheus metrics endpoint and collectors.
enabled: true
# Prometheus listen address for /metrics endpoint.
listen_addr: ':9090'
# Optional constant labels attached to all emitted metrics.
labels:
extra:
service: 'bifrost'
env: 'dev'
# Deprecated: same as labels.extra when it is the only map; must match labels.extra if both appear.
# extra_labels:
# service: 'bifrost'
groups:
golang: true
process: true
kafka: true
tls: true
tcp: true
logging:
# Severity threshold: trace, debug, info, warn, error, fatal.
level: 'info'
# Output format: json (default) or logfmt.
format: 'json'
# Output stream: stdout or stderr.
stream: 'stdout'
# Optional fields injected into every log line.
fields:
extra:
uls_version: '1.0'
service: 'bifrost'
env: 'local'
# Deprecated: same as fields.extra when it is the only map; must match fields.extra if both appear.
# extra_fields:
# uls_version: '1.0'
# How often each bridge logs info-level "bridge periodic stats" (messages_delta and errors_delta
# since the previous log, plus period_seconds). Go duration syntax (e.g. 30s, 5m). Default 5m.
# Set to "0" or "0s" to disable.
periodic_stats_interval: '5m'