asyncapi Binding
Bindingasyncapiclientproxyserver
asyncapi Binding
Defines a binding with asyncapi spec, with server or proxy or client behavior.
client
The client kind asyncapi binding creates composite of kafka or mqtt or http or sse, and tls, tcp bindings with client kind and adapts AsyncAPI streams to Kafka/MQTT/HTTP/SSE streams.
asyncapi_client:
type: asyncapi
kind: client
options:
specs:
my-kafka-api-spec:
servers:
- kafka://localhost:9092
catalog:
my_catalog:
subject: petstore
version: latestproxy
The proxy kind asyncapi binding creates composite of http-kafka, sse-kafka, or mqtt-kafka bindings with proxy kind mapping HTTP/SSE/MQTT streams to Kafka streams.
asyncapi_proxy:
type: asyncapi
kind: proxy
options:
specs:
my-mqtt-api-spec:
servers:
- mqtt://localhost:1883
catalog:
my_catalog:
subject: mqtt-streetlights
version: latest
my-kafka-api-spec:
servers:
- kafka://localhost:9092
catalog:
my_catalog:
subject: kafka-streetlights
version: latest
routes:
- when:
- spec: my-mqtt-api-spec
operation: sendEvents
exit: asyncapi_client
with:
spec: my-kafka-api-spec
operation: toSensorData
- when:
- spec: my-mqtt-api-spec
operation: receiveEvents
exit: asyncapi_client
with:
spec: my-kafka-api-spec
operation: onSensorDataserver
The server kind asyncapi binding creates composite of tcp, tls, and mqtt or http or sse bindings with server kind and adapts MQTT/HTTP/SSE streams to AsyncAPI streams.
mqtt_asyncapi_server:
type: asyncapi
kind: server
options:
specs:
my-mqtt-api-spec:
servers:
- mqtt://localhost:1883
catalog:
my_catalog:
subject: mqtt-streetlights
version: latest
exit: south_kafka_proxy
