kafka cache_server
kafka cache_server
The kafka cache_server binding supports proactive fetch of messages to keep the cache fresh in preparation for new consumers. This is enabled by configuring a list of bootstrap topics for the binding.
kafka_cache_server:
type: kafka
kind: cache_server
options:
bootstrap:
- items-responses
exit: kafka_clientConfiguration (* required)
options
object
The cache_server specific options.
options:
bootstrap:
- items-requests
- items-responses
topics:
- name: items-requests
defaultOffset: liveoptions.bootstrap
arrayofstring
Topics to bootstrap in cache server even when no clients.
options.topics
arrayofobject
Topic configuration.
topics[].name
string
Topic name.
topics[].key
enum[avro,double,float,int32,int64,json,protobuf,string],object
Enforce validation for key
key.model*
enum[avro,double,float,int32,int64,json,protobuf,string]
A schema or type to validate the topic's key. Refer to the individual model docs for type specific implementation.
topics[].value
enum[avro,double,float,int32,int64,json,protobuf,string],object
Enforce validation for value
value.model*
enum[avro,double,float,int32,int64,json,protobuf,string]
A schema or type to validate the topic's value. Refer to the individual model docs for type specific implementation.
topics[].defaultOffset
enum[live,historical]
Fetch offset to use for new consumers
topics[].transforms
array
Extract key or value attributes from the typed Kafka message to apply to the Kafka message id or Kafka headers. The extract-key property must come before the extract-headers property if they both exist.
transforms:
- extract-key: ${message.key.id}transforms:
- extract-headers:
my-kafka-header: ${message.value.test}transforms:
- extract-key: ${message.value.id}
- extract-headers:
my-kafka-header: ${message.value.test}transforms[].extract-key
string| Pattern:^\\$\\{message\\.(key|value)\\.([A-Za-z_][A-Za-z0-9_]*)\\}$
Use a part of the Kafka message as the Kafka message key.
transforms[].extract-headers
objectas map of namedstringproperties | Pattern:^\\$\\{message\\.(key|value)\\.([A-Za-z_][A-Za-z0-9_]*)\\}$
Use a part of the Kafka message as a Kafka message header.
routes*
arrayofobject
Conditional kafka specific routes.
routes[].guarded
objectas map of namedarrayofstring
List of roles required by each named guard to authorize this route.
routes:
- guarded:
my_guard:
- read:itemsroutes[].when
arrayofobject
List of conditions (any match) to match this route. Read more: When a route matches
when[].topic
string
Topic name pattern.
routes[].exit
string
Next binding when following this route.
exit: echo_serverexit
string
Default exit binding when no conditional routes are viable.
exit: echo_servertelemetry
object
Defines the desired telemetry for the binding.
telemetry.metrics
array
Telemetry metrics to track
telemetry:
metrics:
- stream.*
