{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/kafka_rule_post", "title": "kafka_rule_post", "type": "object", "additionalProperties": false, "properties": { "status": { "type": "string", "description": "The status of the rule. Rules can be enabled or disabled.", "example": "enabled" }, "ruleType": { "type": "string", "description": "The type of rule. In this case Kafka (using Firehose). See the Firehose docs for further information.", "enum": [ "kafka" ] }, "requestMode": { "type": "string", "description": "This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably batching docs.", "example": "single" }, "source": { "$ref": "#/components/schemas/rule_source" }, "target": { "type": "object", "additionalProperties": false, "properties": { "routingKey": { "type": "string", "description": "The Kafka partition key. This is used to determine which partition a message should be routed to, where a topic has been partitioned. `routingKey` should be in the format `topic:key` where `topic` is the topic to publish to, and `key` is the value to use as the message key.", "example": "partitionKey" }, "brokers": { "type": "array", "description": "This is an array of brokers that host your Kafka partitions. Each broker is specified using the format `host`, `host:port` or `ip:port`.", "example": [ "kafka.ci.ably.io:19092", "kafka.ci.ably.io:19093" ], "items": { "type": "string", "example": "kafka.ci.ably.io:19092" } }, "auth": { "type": "object", "description": "The Kafka authentication mechanism.", "additionalProperties": false, "properties": { "sasl": { "type": "object", "description": "SASL(Simple Authentication Security Layer) / SCRAM (Salted Challenge Response Authentication Mechanism) uses usernames and passwords stored in ZooKeeper. Credentials are created during installation. See documentation on configuring SCRAM.", "additionalProperties": false, "properties": { "mechanism": { "type": "string", "description": "The hash type to use. SCRAM supports either SHA-256 or SHA-512 hash functions.", "example": "scram-sha-256", "enum": [ "plain", "scram-sha-256", "scram-sha-512" ] }, "username": { "type": "string", "description": "Kafka login credential.", "example": "username" }, "password": { "type": "string", "description": "Kafka login credential.", "example": "password" } } } } }, "enveloped": { "type": "boolean", "nullable": true, "description": "Delivered messages are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking \"Enveloped\" when setting up the rule.", "example": true }, "format": { "type": "string", "description": "JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.", "example": "json" } }, "required": [ "routingKey", "brokers", "auth" ] } }, "required": [ "ruleType", "requestMode", "source", "target" ] }