CompanionCompanion
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
Log out
Companion for Delivery
Companion for Business
Companion for Integration
Contact us
  • Companion for Integration

    • Introduction
    • Getting Started
    • Configuration
    • Excel templating
    • How it works
  • YAML Configuration

    • Principles
    • Syntax
    • Validation
  • Custom Functions

    • Summary
    • arrayToJSON
    • bool
    • concatValueAndUnit
    • convertUnit
    • currentContextId
    • exportTime
    • eval
    • firstNonEmpty
    • getContextName
    • getEvents
    • getLastEventTime
    • getReferencesByAttributeGroup
    • getStoredValue
    • getWorkspaceId
    • hash
    • hasStoreKey
    • if
    • integer
    • join
    • mergeInheritedValues
    • multiValuesToJSON
    • number
    • nodeList
    • order
    • resolveUnitLabel
    • serializeAssetPushLocationsToJSON
    • serializeAttributeLinksToJSON
    • serializeContextReferenceToJSON
    • serializeContextReferencesToJSON
    • serializeContextValuesToJSON
    • serializeDataContainerToJSON
    • serializeDataContainersToJSON
    • serializeListOfValueValuesToJSON
    • serializeReferencesToJSON
    • serializeReferenceToJSON
    • serializeValuesToJSON
    • store
    • toXML
    • uppercase
  • Execution

    • Summary
    • Composite
    • From STEP
    • Standalone
    • Performance statistics
  • Configuration

    • ActiveMQ extension
    • Amazon AWS extension (SNS, SQS, Kinesis, S3)
    • ElasticSearch/OpenSearch extension
    • File extension (Excel, CSV, JSON, XML, JSONL, XMLL)
    • Kafka extension
    • Kafka Core extension
    • MongoDB/Cosmos DB extension
    • SQL extension
    • REST extension
    • Google Pub/Sub extension
  • c4i SaaS

    • Introduction
    • Managing jobs
    • Managing executions
    • Managing users
    • Changelog
  • Changelog

    • Core features changelog
    • ActiveMQ extension changelog
    • Amazon AWS extension changelog
    • Composite extension changelog
    • ElasticSearch extension changelog
    • File extension changelog
    • Kafka extension changelog
    • Kafka Core extension changelog
    • MongoDB/Cosmos DB extension changelog
    • SQL extension changelog
    • REST extension changelog
    • Google Pub/Sub extension changelog

Kafka extension

Plugin ID

The plugin ID for Apache Kafka is fr.cantor.c4i.KafkaDelivery.

Properties

Environment independent parameters (set in extension configuration or properties file)

Property keyDescription MandatoryDefault value
configAssetIdThe ID of the asset containing the YAML mappingsYes
connectionThe name of properties file to useYes
prefixTopicNamesWithContextIdtrue or false to indicate whether or not to prefix the topics/queues names with the context IDsYes
outputFormatCSV, EXCEL, JSON, JSONL, XML or XMLLYes
autoCreateTopicstrue to automatically create topics if they don't already exist, false otherwiseNo
serializationModeNONE, AVRO, PROTOBUFNo
schemaPathThe path to the Avro or Protobuf schemaNo
topic.mapping.${targetName}The topic mapping for the chosen targetNo
cacheConfigThe ID of the asset containing the JCS configurationNo
displayPerfStattrue to display performance statistics (see Performance statistics dedicated page)No

Environment dependent parameters

In order to make the Kafka connector work, you need to connect to the Stibo SFTP for your STEP environment and create the folder /shared/customer-config/c4i/credentials/kafka (for STEP usage) or create the folder ~/.c4i/credentials/kafka on your file system (for Standalone usage).

Then you can store your Kafka connection properties in the file myConnection.properties and reference it in the extension configuration parameter "Connection name" or through the connection property for Composite or Standalone.

Configuration example

Message ID

The fields identified as the message key will be sent as the Kafka Message ID, and will always be serialized as a String.

  • If only one field is mapped, the Message ID will be this single field value.
  • If multiple fields are mapped, the Message ID will be a serialized JSON document containing the key-values pairs.

Important: These fields will not be part of the produced message. If you wish to add them to the message as well, you will need to map them twice

Example

Given the following XML:

<STEP-ProductInformation ContextID="GL">
    <Product ID="PRD1">
        <Name>Test Product</Name>
    </Product>
</STEP-ProductInformation>

The following example illustrates simple keys:

The following example illustrates complex keys:

The following example illustrates how to include the key in the message:

Serialization and schema registry

You can provide the URL to your schema registry and your Avro or Protobuf schema. C4i will use the schema to serialize the data and send it to the schema registry.

Some useful information:

  • Only values are serialized
  • The root object names must correspond to the topic names (excluding context namespaces)
  • JSON objects with key-value pairs can be represented with map structures
  • Date and datetime attributes are converted to the relevant data types, unless explicitly converted

Serializer classes

Serialization modeSerializer class
NONEorg.apache.kafka.common.serialization.StringSerializer
AVROio.confluent.kafka.serializers.KafkaAvroSerializer
PROTOBUForg.apache.kafka.common.serialization.ByteArraySerializer

Example

The following YAML mappings:

- Product:
    product[id]:
        - ./@ID: id
        - c4i:serializeValuesToJSON(.): values
        - Name/text(): name

Can be serialized with the following schemas:

Topics mapping

You can use the same YAML file to publish to different topics.

For example, with the following YAML file :

- Product:
  products[id]:
    - ./@ID: id
    - Name/text(): name

And the following configurations

topic.mapping.targetTopic=products.dev
topic.mapping.targetTopic=products.prod

You can use the same YAML file to publish data to two different topics.

When configuring a STEP extension, use the following format :

target1=topic1;target2=topic2
Last Updated: 12/11/25, 10:57 AM
Prev
File extension (Excel, CSV, JSON, XML, JSONL, XMLL)
Next
Kafka Core extension