sse Binding
sse Binding
Zilla runtime sse binding.
sse_server:
type: sse
kind: server
exit: sse_kafka_proxy
Summary
Defines a binding with Server Sent Events (sse)
protocol support, with server
behavior.
The server
kind sse
binding converts inbound http
request-response streams into sse
request-response streams, with optionally configured retry
delay.
Messages received on the sse
response stream are encoded using Server Sent Events
protocol, including support for custom event
types and last event id
.
Configuration
Properties
* required
kind*
enum
[ "client", "server" ]
Behave as a sse
client
or server
.
options
object
sse
-specific options.
options:
retry: 2000
options.retry
integer
| Default:2000
Retry delay (ms)
exit
string
Default exit binding when no conditional routes are viable.
exit: sse_kafka_proxy
routes
array
ofobject
Conditional sse
-specific routes.
routes:
- guarded:
test:
- read:items
when:
- path: /items
exit: sse_kafka_proxy
routes[].guarded
object
as named map ofstring:string
array
List of roles required by each named guard to authorize this route.
routes:
- guarded:
test:
- 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 pattern.
routes[].exit*
string
Next binding when following this route.
routes:
- when:
...
exit: sse_kafka_proxy
* required