Skip to content

Commit

Permalink
feat(kafka): migrate kafka inbound connectors to template generator (#…
Browse files Browse the repository at this point in the history
…2250)

* feat(kafka): migrate kafka inbound connectors to template generator

* chore(kafka): standardize Avro naming

* chore(kafka): delete redundant property option for groupId
  • Loading branch information
Oleksiivanov committed Apr 4, 2024
1 parent 61c7bef commit 7bf6980
Show file tree
Hide file tree
Showing 23 changed files with 3,195 additions and 1,496 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
{
"$schema" : "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json",
"name" : "Kafka Boundary Event Connector",
"id" : "io.camunda.connectors.inbound.KafkaBoundary.v1",
"description" : "Consume Kafka messages",
"documentationRef" : "https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/kafka/?kafka=inbound",
"version" : 5,
"category" : {
"id" : "connectors",
"name" : "Connectors"
},
"appliesTo" : [ "bpmn:BoundaryEvent" ],
"elementType" : {
"value" : "bpmn:BoundaryEvent",
"eventDefinition" : "bpmn:MessageEventDefinition"
},
"groups" : [ {
"id" : "connectorType",
"label" : "Connector type"
}, {
"id" : "authentication",
"label" : "Authentication"
}, {
"id" : "kafka",
"label" : "Kafka"
}, {
"id" : "message",
"label" : "Message deserialization"
}, {
"id" : "activation",
"label" : "Activation"
}, {
"id" : "correlation",
"label" : "Correlation"
}, {
"id" : "output",
"label" : "Output mapping"
} ],
"properties" : [ {
"id" : "connectorType",
"value" : "io.camunda:connector-kafka-inbound:1",
"group" : "connectorType",
"binding" : {
"name" : "inbound.type",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "authenticationType",
"label" : "Authentication type",
"description" : "Username/password or custom",
"optional" : false,
"value" : "credentials",
"constraints" : {
"notEmpty" : true
},
"group" : "authentication",
"binding" : {
"name" : "authenticationType",
"type" : "zeebe:property"
},
"type" : "Dropdown",
"choices" : [ {
"name" : "Credentials",
"value" : "credentials"
}, {
"name" : "Custom",
"value" : "custom"
} ]
}, {
"id" : "authentication.username",
"label" : "Username",
"description" : "Provide the username (must have permissions to produce message to the topic)",
"optional" : true,
"group" : "authentication",
"binding" : {
"name" : "authentication.username",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "authentication.password",
"label" : "Password",
"description" : "Provide a password for the user",
"optional" : true,
"group" : "authentication",
"binding" : {
"name" : "authentication.password",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "serializationType",
"label" : "Deserialization type",
"description" : "Select the deserialization type. For details, visit the <a href=\"https://docs.camunda.io/docs/components/connectors/out-of-the-box-connectors/kafka/?kafka=inbound\" target=\"_blank\">documentation</a>",
"optional" : false,
"value" : "json",
"group" : "kafka",
"binding" : {
"name" : "serializationType",
"type" : "zeebe:property"
},
"type" : "Dropdown",
"choices" : [ {
"name" : "Default (JSON)",
"value" : "json"
}, {
"name" : "AVRO (experimental)",
"value" : "avro"
} ]
}, {
"id" : "topic.bootstrapServers",
"label" : "Bootstrap servers",
"description" : "Provide bootstrap server(s), comma-delimited if there are multiple",
"optional" : false,
"constraints" : {
"notEmpty" : true
},
"group" : "kafka",
"binding" : {
"name" : "topic.bootstrapServers",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "topic.topicName",
"label" : "Topic",
"description" : "Provide topic name",
"optional" : false,
"constraints" : {
"notEmpty" : true
},
"group" : "kafka",
"binding" : {
"name" : "topic.topicName",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "groupId",
"label" : "Consumer Group ID",
"description" : "Provide the consumer group ID used by the connector. Leave empty for an automatically generated one",
"optional" : false,
"group" : "kafka",
"binding" : {
"name" : "groupId",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "additionalProperties",
"label" : "Additional properties",
"description" : "Provide additional Kafka consumer properties in JSON",
"optional" : true,
"feel" : "required",
"group" : "kafka",
"binding" : {
"name" : "additionalProperties",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "offsets",
"label" : "Offsets",
"description" : "List of offsets, e.g. '10' or '=[10, 23]'. If specified, it has to have the same number of values as the number of partitions",
"optional" : false,
"feel" : "optional",
"group" : "kafka",
"binding" : {
"name" : "offsets",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "autoOffsetReset",
"label" : "Auto offset reset",
"description" : "What to do when there is no initial offset in Kafka or if the current offset does not exist any more on the server. You should only select none if you specified the offsets",
"optional" : false,
"value" : "latest",
"constraints" : {
"notEmpty" : true
},
"group" : "kafka",
"binding" : {
"name" : "autoOffsetReset",
"type" : "zeebe:property"
},
"type" : "Dropdown",
"choices" : [ {
"name" : "None",
"value" : "none"
}, {
"name" : "Latest",
"value" : "latest"
}, {
"name" : "Earliest",
"value" : "earliest"
} ]
}, {
"id" : "avro.schema",
"label" : "Avro schema",
"description" : "Avro schema for the message value",
"optional" : false,
"constraints" : {
"notEmpty" : true
},
"feel" : "required",
"group" : "message",
"binding" : {
"name" : "avro.schema",
"type" : "zeebe:property"
},
"condition" : {
"property" : "serializationType",
"equals" : "avro",
"type" : "simple"
},
"type" : "Text"
}, {
"id" : "activationCondition",
"label" : "Activation condition",
"description" : "Condition under which the Connector triggers. Leave empty to catch all events",
"optional" : true,
"feel" : "required",
"group" : "activation",
"binding" : {
"name" : "activationCondition",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "correlationKeyProcess",
"label" : "Correlation key (process)",
"description" : "Sets up the correlation key from process variables",
"constraints" : {
"notEmpty" : true
},
"feel" : "required",
"group" : "correlation",
"binding" : {
"name" : "correlationKey",
"type" : "bpmn:Message#zeebe:subscription#property"
},
"type" : "String"
}, {
"id" : "correlationKeyPayload",
"label" : "Correlation key (payload)",
"description" : "Extracts the correlation key from the incoming message payload",
"constraints" : {
"notEmpty" : true
},
"feel" : "required",
"group" : "correlation",
"binding" : {
"name" : "correlationKeyExpression",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "messageIdExpression",
"label" : "Message ID expression",
"description" : "Expression to extract unique identifier of a message",
"optional" : true,
"feel" : "required",
"group" : "correlation",
"binding" : {
"name" : "messageIdExpression",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "messageNameUuid",
"generatedValue" : {
"type" : "uuid"
},
"group" : "correlation",
"binding" : {
"name" : "name",
"type" : "bpmn:Message#property"
},
"type" : "Hidden"
}, {
"id" : "resultVariable",
"label" : "Result variable",
"description" : "Name of variable to store the response in",
"group" : "output",
"binding" : {
"name" : "resultVariable",
"type" : "zeebe:property"
},
"type" : "String"
}, {
"id" : "resultExpression",
"label" : "Result expression",
"description" : "Expression to map the response into process variables",
"feel" : "required",
"group" : "output",
"binding" : {
"name" : "resultExpression",
"type" : "zeebe:property"
},
"type" : "Text"
} ],
"icon" : {
"contents" : "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMTgnIGhlaWdodD0nMTgnIHZpZXdCb3g9JzAgMCAyNTYgNDE2JyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHByZXNlcnZlQXNwZWN0UmF0aW89J3hNaWRZTWlkJz4KICAgIDxwYXRoIGQ9J00yMDEuODE2IDIzMC4yMTZjLTE2LjE4NiAwLTMwLjY5NyA3LjE3MS00MC42MzQgMTguNDYxbC0yNS40NjMtMTguMDI2YzIuNzAzLTcuNDQyIDQuMjU1LTE1LjQzMyA0LjI1NS0yMy43OTcgMC04LjIxOS0xLjQ5OC0xNi4wNzYtNC4xMTItMjMuNDA4bDI1LjQwNi0xNy44MzVjOS45MzYgMTEuMjMzIDI0LjQwOSAxOC4zNjUgNDAuNTQ4IDE4LjM2NSAyOS44NzUgMCA1NC4xODQtMjQuMzA1IDU0LjE4NC01NC4xODQgMC0yOS44NzktMjQuMzA5LTU0LjE4NC01NC4xODQtNTQuMTg0LTI5Ljg3NSAwLTU0LjE4NCAyNC4zMDUtNTQuMTg0IDU0LjE4NCAwIDUuMzQ4LjgwOCAxMC41MDUgMi4yNTggMTUuMzg5bC0yNS40MjMgMTcuODQ0Yy0xMC42Mi0xMy4xNzUtMjUuOTExLTIyLjM3NC00My4zMzM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