http-kafka Binding
Bindinghttp-kafkaproxy
http-kafka Binding
The proxy
kind http-kafka
binding adapts http
request-response streams to kafka
topic streams.
proxy
Behave as an http-kafka
proxy
.
http_kafka_proxy:
type: http-kafka
kind: proxy
routes:
- when:
- method: GET
path: /items
exit: kafka_cache_client
with:
capability: fetch
topic: items-snapshots
merge:
content-type: application/json
- when:
- method: GET
path: /items/{id}
exit: kafka_cache_client
with:
capability: fetch
topic: items-snapshots
filters:
- key: ${params.id}
- when:
- method: PUT
path: /items/{id}
- method: GET
path: /items/{id};cid={correlationId}
exit: kafka_cache_client
with:
capability: produce
topic: items-requests
acks: leader_only
key: ${params.id}
reply-to: items-responses
async:
location: /items/${params.id};cid=${correlationId}