Fluent Commerce Logo
Docs

Kafka Connector built on top of Connect SDK

How-to Guide

Author:

Fluent Commerce

Changed on:

30 Oct 2023

Key Points

  • The User can configure Kafka Connector on top of the Connect SDK.
  • Some configuration is required. 

Steps

Step arrow right iconKafka Connector built on top of Connect SDK

We have extended our queue listener support beyond SQS and now also includes Kafka now.Kafka and SQS can be used interchangeably as queue listeners, providing more options to our users.Provided reference solutions can be used to demonstrate how to apply these changes to configuration files and use either queue listener. With these examples, it's easy to switch between SQS or Kafka, depending on your specific needs and requirements.Follow this Fluent Connector Configuration | Kafka Listener Configuration for a more detailed explanation of Kafka configuration.

Prerequisites

  • At least a running Kafka broker, ZooKeeper containerKafdrop(Optional)
  • localstack container is running
  • Access to a Fluent account
  • API key/secret for communicating with external network
Create a Docker file `docker-compose.yml` with content below to quickly set up a Kafka broker.

Configuration Changes

This is an example of using Kafka:
PropertyMandatoryDescriptionDefault Value
`fluent-connect.listeners.<listener_name>.type`Yes

`"sqs"` or `"kafka"`
`fluent-connect.listeners.<listener_name>.retry`NoThe number of retries for a topic determines the number of corresponding retry topics that will be created. These retry topics should follow a common naming convention:`{listenerId}-retry-{iterationCount}`For instance, if the "messages" listener has been configured with three retries, the Kafka container should include the following topics:messagesmessages-retry-1messages-retry-2messages-retry-3
(Maximum retry is 5. Last failed retry will be moved to Dead Letter Queue topic.)
n/a
`fluent-connect.listeners.<listener_name>.props`:`retryIntervalInSec`NoThe delay time between retry attempts.(The delay time should not be greater than max pool interval of current Kafka broker.)n/a
`kafka.props`NoThe connection configurations for Kafka producer and consumer can be referred to as:(If this property is not set, the producer and consumer will connect to the Kafka on local at `localhost:9092`)`kafka:``  props:``bootstrap.servers: localhost:9092`
`kafka.props` example:
Fluent Commerce

Fluent Commerce