sse-kafka proxy
sse-kafka proxy
The sse-kafka proxy binding for adapting sse
data streams to kafka
data streams.
sse_kafka_proxy:
type: sse-kafka
kind: proxy
routes:
- when:
- path: /items
exit: kafka_cache_client
with:
topic: items-snapshots
event:
id: '["${base64(key)}","${etag}"]'
Configuration (* required)
routes
array
ofobject
Conditional sse-kafka
specific routes.
routes:
- when:
- path: /items
exit: kafka_cache_client
with:
topic: items-snapshots
event:
id: '["${base64(key)}","${etag}"]'
routes[].guarded
object
as map of namedarray
ofstring
List of roles required by each named guard to authorize this route.
routes:
- guarded:
my_guard:
- read:items
routes[].when
array
ofobject
List of conditions (any match) to match this route. Read more: When a route matches
routes:
- when:
- path: /items
when[].path
string
Path with optional embedded parameter names, such as /{topic}
.
routes[].exit
string
Next binding when following this route.
routes:
- when:
...
exit: kafka_cache_client
routes[].with
object
Kafka parameters used when adapting sse
data streams to kafka
data streams.
with.topic*
string
Topic name, optionally referencing path parameter such as ${params.topic}
.
with.filters
array
ofobject
Kafka filters for matched route when adapting sse
data streams to kafka
data streams.
List of criteria (any match). All specified headers and key must match for the combined criteria to match.
filters[].key
string
Message key, optionally referencing path parameter such as ${params.key}
.
filters[].headers
object
as map of namedstring
properties
Message headers, with value optionally referencing path parameter such as ${params.headerX}
.
with.event
object
Defines the SSE event syntax used when delivering Kafka messages to SSE clients.
event.id
enum
[${etag}
,["${base64(key)}","${etag}"]
] | Default:${etag}
Format of id
field in sse
event
exit
string
Default exit binding when no conditional routes are viable.
exit: echo_server
telemetry
object
Defines the desired telemetry for the binding.
telemetry.metrics
array
Telemetry metrics to track
telemetry:
metrics:
- stream.*