Skip to content

Quick start

This quick start takes you from a running Kafka Connect environment to IBM i data queue messages in a Kafka topic. Each step links to the detailed guide.

  1. Get the connector and a license
  2. Install the connector
  3. Make the license available
  4. Create a source connector
  5. Check the result

Check the prerequisites first. If you do not run Kafka yet, start with the sample stand-alone Confluent Docker setup: it includes the broker, Kafka Connect and the connector, so you can continue at step 3.

Get the connector and a license

  1. Download the self-managed connector ZIP file from Confluent Hub, even if you use a different Kafka flavor.
  2. Request a trial license. You receive the license file as400-license.lic.
  3. To replicate IBM i tables, also request the InfoCDC installation package and add a table as described in the change data capture quick start.

Install the connector

  1. Extract the ZIP file into a folder on the plugin.path of each Kafka Connect worker, or install it with the tool of your Kafka vendor. Confluent customers can use the Confluent connector installation instructions.
  2. Restart the Kafka Connect workers so that they discover the connector.
  3. Check that the connector is installed. The Kafka Connect REST API lists the three InfoConnect connector classes:

    curl -s http://localhost:8083/connector-plugins
    

For Confluent Cloud and the other deployment options, see Installation.

Make the license available

Copy as400-license.lic to the same folder on each Kafka Connect worker, for example /opt. The connector then reads it with the FILE protocol.

For other locations, such as S3, Azure Storage, HTTP or a Kafka topic, see License management.

Create a source connector

  1. Create a file as400-source.json with the following configuration. Replace the IBM i host, user, password, data queue and library with your values. For InfoCDC, use the replication data queue of your table.

    as400-source.json
    {
      "name": "AS400SourceConnector",
      "config": {
        "connector.class": "com.infoviewsystems.kafka.connect.as400.core.AS400SourceConnector",
        "key.converter": "org.apache.kafka.connect.storage.StringConverter",
        "value.converter": "org.apache.kafka.connect.json.JsonConverter",
        "value.converter.schemas.enable": "false",
        "as400.url": "your-ibm-i-host",
        "as400.userId": "your-username",
        "as400.password": "your-password",
        "as400.license.protocol": "FILE",
        "as400.license.path": "/opt",
        "license.fileName": "as400-license.lic",
        "as400.read.dataqueue.name": "your-data-queue-name",
        "as400.read.dataqueue.library": "your-library",
        "source.kafka.topic": "Test",
        "topic.creation.default.replication.factor": "1",
        "topic.creation.default.partitions": "1"
      }
    }
    
  2. Create the connector with the Kafka Connect REST API:

    curl -s -X POST -H "Content-Type: application/json" \
         --data @as400-source.json http://localhost:8083/connectors
    

    You can also create the connector in the UI of your Kafka platform, for example in Confluent Control Center or Confluent Cloud.

Warning

The sample stores the IBM i password in plain text. Before production, encrypt the secrets, see Hardening and scaling.

Check the result

  1. Check that the connector and its task are RUNNING:

    curl -s http://localhost:8083/connectors/AS400SourceConnector/status
    
  2. Add an entry to the data queue, or change a row in a table that InfoCDC replicates.

  3. Read the topic:

    kafka-console-consumer --bootstrap-server localhost:9092 --topic Test --from-beginning
    

If the connector does not start or no messages arrive, see Troubleshooting.

Next steps