HTTP to Kafka, a webhook endpoint that tries to represent every event with context
1.9K
An incoming webhook endpoint that tries tries to never reject a message. The sequel to kafka-keyvalue in our need for Kafka-related microservices components that do one thing and do it well. To aid both happy and not-so-happy paths for integrations it captures most attributes of the incoming request alongside the payload.
kafkacat -J and the result will be consumable through jq.ce_http or headerxyhttp_ because it's more readable than x-yolean- or yolean.se/whatever.cookie
At Yolean we use kafka-pixy for many use cases with occasional, as opposed to constant, message production. We never use pixy for consumption, mainly because kafka-keyvalue sidecars covers a wider use case for occasional consumption.
Happy paths work great with pixy, but it has a habit of silently skipping message production for requests that don't meet assumptions on for example content-type or path. To increase the confusion in such cases, HTTP responses contain no clues.
Kafka-hook is designed to do anything it can to forward the request to kafka, and if it fails anyway it should be expected to log stack traces. Also it tries to send an
Supported:
{"partition": , "offset": } status 200 response body
{"error": } status 500 response body
Not supported:
X-Kafka- HTTP headers
sync query parameter (kafka-hook is always sync=true)key query parameterContent type
Image
Digest
Size
27.1 MB
Last updated
about 6 years ago
docker pull solsson/kafka-hook