Skip to main content

Connector essentials

At its core, a connector acts as an anti-corruption layer. It manages interactions with external systems and crucial data transformations for integrations.

Key functions

Connectors act as lightweight business logic layers, performing essential tasks:
  1. Data Transformation: Ensure compatibility between different data formats, like date formats, value lists, and units.
  2. Information Enrichment: Add non-critical integration information like flags and tracing GUIDs.

Creating a connector

  1. Create a Kafka Consumer: Follow this guide to configure a Kafka consumer for your Connector.
  2. Create a Kafka Producer: Refer to this guide for instructions on setting up a Kafka producer.
Adaptable Kafka settings can yield advantageous event-driven communication patterns. Fine-tuning partition counts and consumers based on load testing is crucial for optimal performance.

Design considerations

Efficient Connector design within an event-driven architecture demands:
  • Load balancing solutions for varying communication types between the Connector and legacy systems.
  • Custom implementations for request load balancing, Connector scaling, and more.
Incorporate all received Kafka headers in responses to ensure proper communication with the FlowX Engine.

Connector configuration sample

Here’s a basic setup example for a connector:
  • Configurations and examples for Kafka listeners and message senders.
  • OPTIONAL: Activation examples for custom health checks.
Sample available here Follow these steps and check the provided code snippets to effectively implement your custom FLOWX connector:
  1. Name Your Connector: Choose a meaningful name for your connector service in the configuration file (quickstart-connector/src/main/resources/config/application.yml):
  1. Select Listening Topic: Decide the primary topic for your connector to listen on ( you can do this at the following path → quickstart-connector/src/main/resources/config/application-kafka.yml):
If the connector needs to listen to multiple topics, ensure you add settings and configure a separate thread pool executor for each needed topic (refer to KafkaConfiguration, you can find it at quickstart-connector/src/main/java/ai/flowx/quickstart/connector/config/KafkaConfiguration.java).
  1. Define Reply Topic: Determine the reply topic, aligning with the Engine’s topic pattern.
  2. Adjust Consumer Threads: Modify consumer thread counts to match partition numbers.
The FlowX Engine does not consume replies from arbitrary topic names — it subscribes by topic pattern. Your reply topic must match one of the two patterns the process engine listens on:
  • Default pattern: KAFKA_TOPIC_PATTERN resolves to <package><environment>engine.receive.* (out of the box ai.flowx.engine.receive.*; the prefix follows your deployment’s KAFKA_TOPIC_NAMING_* settings). Consumed with consumer group adapters (KAFKA_CONSUMER_GROUPID_ADAPTERS). A reply topic like ai.flowx.engine.receive.easy-connector.results matches; a name like ai.flowx.easy-connector.out does not.
  • Dedicated connector pattern: set KAFKA_TOPIC_CONNECTOR_PATTERN on the process engine to subscribe an additional listener for connector replies (consumer group connectors, KAFKA_CONSUMER_GROUPID_CONNECTORS). The listener starts only when the variable is non-empty. Use this when connector reply topics keep their own naming instead of the engine.receive convention.
Topic provisioning: the in and out topics belong to your connector — they are not part of the topic catalog FlowX provisions at deployment, and FlowX brokers run with topic auto-creation turned off. Create both topics in your Kafka cluster before starting the connector, with a partition count that matches your consumer scaling (instances × consumer threads).
Custom connectors are a self-hosted capability. On FlowX.AI SaaS the Kafka cluster is internal to the platform and not reachable from outside, so a customer-run connector cannot connect to it. On SaaS, integrate external systems through the Integration Designer (REST data sources and workflows), incoming webhooks, or email triggers instead.
  1. Define Incoming Data Format (DTO): Specify the structure for incoming and outgoing data using DTOs. This can be found at the path: quickstart-connector/src/main/java/ai/flowx/quickstart/connector/dto/KafkaRequestMessageDTO.java.
  1. Define Outgoing Data Format (DTO): Specify the structure for outgoing data at the following path → quickstart-connector/src/main/java/ai/flowx/quickstart/connector/dto/KafkaResponseMessageDTO.java.
  1. Implement Business Logic: Develop logic for handling messages from the Engine and generating replies. Ensure to include the process instance UUID as a Kafka message key.
Optional Configuration Steps:
  • Health Checks: Enable health checks for all utilized services in your setup.
Upon completion, your configuration files (application.yaml and application-kafka.yaml) should resemble the provided samples, adjusting settings according to your requirements:
And your Kafka configuration file (application-kafka.yaml) should look like this:

Setting up the connector locally

For detailed setup instructions, refer to the Setting Up FlowX.AI Quickstart Connector Readme:

Readme file

Prerequisites:
  • a terminal to clone the GitHub repository
  • a code editor and IDE
  • JDK version 11 or later (the quickstart-connector sample targets Java 11)
  • the Docker Desktop app
  • an internet browser

Integrating a connector in FlowX.AI Designer

To integrate and utilize the connector within FlowX.AI Designer, follow these steps:
  1. Process Designer Configuration: Utilize the designated communication nodes within the Process Designer:
  • Send Message Task: Transmit a message to a topic monitored by the connector. Make sure you choose Kafka Send Action type.
  1. Connector Operations: The connector identifies and processes the incoming message.
  2. Handling Response: Upon receiving a response, the connector serializes and deposits the message onto the specified OUT topic.
  3. Engine Processing: The engine detects the new message, captures the entire content, and stores it within its variables based on the configured variable settings.
You can check another example of a more complex connector by checking the following repository:

Currency Exchange Example Connector

Last modified on September 10, 2026