How to use ¶
Before we start - Limitations ¶
Before we start, some reminders on the limitations:
Topic names must be unique ¶
Topic names in the cluster must be unique. So if you adopt to have one repository for different teams/users, ensure to have a strong naming convention that will avoid collisions.
Some properties are not updatable ¶
Some topic properties
can not
be updated, and others can, on condition.
The most common one is
cleanup.policy
which defaults to
delete
. You
can not
change the value of this property
to anything else. Instead, you must delete the topic first and re-create it.
Tip
To delete a topic via this tool, and re-create it, just comment it out, render, deploy, and un-comment it again with new settings.
Input and Configuration files definitions ¶
The tool will accept a configuration file that will override various settings and inject it into the final CloudFormation template.
Parameters ¶
Generic properties used to connect to Kafka cluster. |
||
properties |
||
|
#/definitions/BootstrapServers |
|
|
#/definitions/SecurityProtocol |
|
|
#/definitions/SASLMechanism |
|
|
#/definitions/SASLUsername |
|
|
#/definitions/SASLPassword |
|
|
#/definitions/RegistryUrl |
|
|
#/definitions/RegistryUsername |
|
|
#/definitions/RegistryPassword |
|
|
ews-kafka-schema.json#/definitions/CompatibilityMode |
|
definitions |
||
|
Endpoint URL of the Kafka cluster in the format hostname:port |
|
type |
string |
|
|
Kafka Security Protocol. |
|
type |
string |
|
enum |
PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL |
|
default |
PLAINTEXT |
|
|
Kafka SASL mechanism for Authentication |
|
type |
string |
|
enum |
PLAIN, GSSAPI, OAUTHBEARER, SCRAM-SHA-256, SCRAM-SHA-512 |
|
default |
PLAIN |
|
|
Kafka SASL username for Authentication |
|
type |
string |
|
default |
||
|
Kafka SASL password for Authentication |
|
type |
string |
|
default |
||
|
Schema registry URL |
|
type |
string |
|
|
Schema registry username |
|
type |
string |
|
|
Schema registry password |
|
type |
string |
|
|
The username and password together in the form of username:password |
|
type |
string |
Input and configuration ¶
type |
object |
|||
properties |
||||
|
ews-kafka-parameters.json |
|||
|
type |
object |
||
properties |
||||
|
type |
array |
||
items |
ews-kafka-topic.json |
|||
|
ews-kafka-topic.json#/definitions/ReplicationFactor |
|||
|
Name or ARN of the Lambda function to use for Custom::KafkaTopic |
|||
type |
string |
|||
|
type |
string |
||
enum |
Retain, Delete |
|||
default |
Retain |
|||
|
Whether to import existing topics on Create. Fails if set to false |
|||
type |
boolean |
|||
default |
True |
|||
|
type |
object |
||
properties |
||||
|
ews-kafka-acl.json#/properties/Policies |
|||
|
Name or ARN of the Lambda function to use for Custom::KafkaACL |
|||
type |
string |
|||
|
type |
object |
||
properties |
||||
|
Name or ARN of the Schema Registry function to use |
|||
type |
string |
|||
|
type |
string |
||
|
ews-kafka-parameters.json#/definitions/RegistryUsername |
|||
|
ews-kafka-parameters.json#/definitions/RegistryPassword |
|||
|
ews-kafka-parameters.json#/definitions/RegistryUserInfo |
|||
|
ews-kafka-schema.json#/definitions/CompatibilityMode |
|||
|
When set, overrides the DeletionPolicy set as default for all schemas |
|||
type |
string |
|||
enum |
Retain, Delete |
|||
default |
Retain |
|||
|
type |
object |
||
properties |
||||
|
type |
string |
||
format |
hostname |
|||
|
type |
string |
||
pattern |
^[^/](.*)/$ |
|||
default |
||||
additionalProperties |
False |
|||
definitions |
||||
|
ews-kafka-schema.json |
|||
|
ews-kafka-acl.json |
ACLs ¶
Resource to create Kafka topics in your cluster. |
|||
properties |
|||
|
type |
array |
|
items |
#/definitions/PolicyDef |
||
uniqueItems |
True |
||
definitions |
|||
|
type |
object |
|
properties |
|||
|
Name of the resource to apply the ACL for |
||
type |
string |
||
|
Pattern type for resource value |
||
type |
string |
||
enum |
LITERAL, PREFIXED, MATCH |
||
pattern |
^[A-Z]+$ |
||
default |
LITERAL |
||
|
Kafka user to apply the ACLs for. |
||
type |
string |
||
|
Kafka user to apply the ACLs for. |
||
type |
string |
||
enum |
CLUSTER, DELEGATION_TOKEN, GROUP, TOPIC, TRANSACTIONAL_ID |
||
|
Access action allowed. |
||
type |
string |
||
enum |
ALL, READ, WRITE, CREATE, DELETE, ALTER, DESCRIBE, CLUSTER_ACTION, DESCRIBE_CONFIGS, ALTER_CONFIGS, IDEMPOTENT_WRITE |
||
|
Effect for the ACL. |
||
type |
string |
||
enum |
DENY, ALLOW |
||
|
Specify the host for the ACL. Defaults to ‘*’ |
||
type |
string |
||
default |
* |
||
additionalProperties |
False |
Topics ¶
Resource to create Kafka topics in your cluster. |
|||
properties |
|||
|
#/definitions/Name |
||
|
#/definitions/PartitionsCount |
||
|
#/definitions/ReplicationFactor |
||
|
ews-kafka-parameters.json#/definitions/BootstrapServers |
||
|
ews-kafka-parameters.json#/definitions/SecurityProtocol |
||
|
ews-kafka-parameters.json#/definitions/SASLMechanism |
||
|
ews-kafka-parameters.json#/definitions/SASLUsername |
||
|
ews-kafka-parameters.json#/definitions/SASLPassword |
||
|
#/definitions/TopicSchemas |
||
|
#/definitions/TopicsSettings |
||
definitions |
|||
|
Kafka topic name |
||
type |
string |
||
minLength |
1 |
||
pattern |
^[a-zA-Z0-9_.-]+$ |
||
|
Number of partitions for the new Kafka topic |
||
type |
integer |
||
default |
1 |
||
|
Kafka topic replication factor |
||
type |
integer |
||
default |
3 |
||
|
When set, overrides the DeletionPolicy set on the Topic of the schema. For safety, defaulting to Retain |
||
type |
string |
||
enum |
Retain, Delete |
||
default |
Retain |
||
|
type |
object |
|
properties |
|||
|
ews-kafka-schema.json#/definitions/TopicSchemaDef |
||
|
ews-kafka-schema.json#/definitions/TopicSchemaDef |
||
|
ews-kafka-schema.json#/definitions/TopicSchemaDef |
||
|
When set, overrides the DeletionPolicy set on the Topic of the schema. For safety, defaulting to Retain |
||
type |
string |
||
enum |
Retain, Delete |
||
default |
Retain |
||
|
type |
object |
|
properties |
|||
|
|||
type |
string |
||
enum |
compact, delete, compact,delete |
||
default |
delete |
||
|
|||
type |
string |
||
enum |
uncompressed, zstd, lz4, snappy, gzip, producer |
||
default |
producer |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
86400000 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
60000 |
||
|
|||
type |
integer |
||
minimum |
-1 |
||
default |
604800000 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
9223372036854775807 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
9223372036854775807 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
4096 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
9223372036854775807 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
|
|||
type |
number |
||
maximum |
1.0 |
||
minimum |
0.0 |
||
default |
0.5 |
||
|
|||
type |
integer |
||
minimum |
0 |
||
default |
1048588 |
||
|
|||
type |
boolean |
||
|
|||
type |
string |
||
|
|||
type |
string |
Schema ¶
Note that for schemas, this only works for topic name strategy. Resulting schemas will be
${topic.name}-[key|value]
Resource to create Kafka topics in your cluster. |
||||
properties |
||||
|
ews-kafka-parameters.json#/definitions/RegistryUrl |
|||
|
ews-kafka-parameters.json#/definitions/RegistryUsername |
|||
|
ews-kafka-parameters.json#/definitions/RegistryPassword |
|||
|
ews-kafka-parameters.json#/definitions/RegistryUserInfo |
|||
|
type |
string |
||
|
#/definitions/SerializerDef |
|||
|
type |
string / object |
||
|
#/definitions/CompatibilityMode |
|||
|
The Lambda Function ARN |
|||
type |
string |
|||
|
If set to true, the Schema is set to hard delete. Use carefully |
|||
type |
boolean |
|||
default |
False |
|||
definitions |
||||
|
type |
string |
||
enum |
BACKWARD, BACKWARD_TRANSITIVE, FORWARD, FORWARD_TRANSITIVE, FULL, FULL_TRANSITIVE, NONE |
|||
default |
NONE |
|||
|
type |
string |
||
enum |
AVRO, JSON, PROTOBUF |
|||
|
type |
object |
||
properties |
||||
|
#/definitions/SerializerDef |
|||
|
oneOf |
type |
string |
|
type |
object |
|||
|
#/definitions/CompatibilityMode |