Attention: This version of Event Streams has reached End of Support. For more information about supported versions, see the support matrix.

Migrating from open-source Apache Kafka to Event Streams

If you are using open-source Apache Kafka as your event-streaming platform, you can move to Event Streams and benefit from its features and enterprise-level support. The main difference is that Event Streams requires connections to be secured.

Prerequisites

Ensure you have an Event Streams deployment available. See the instructions for installing on IBM Cloud Private, or the instructions for installing on OpenShift Container Platform.

For many of the tasks, you can use the Kafka console tools. Many of the console tools work with Event Streams, as described in the using console tools topic.

Re-create your topics in Event Streams

In Event Streams, re-create your existing topics from your open-source Kafka cluster.

To list your existing topics and configurations, run the following Kafka console tool:

./kafka-topics.sh --bootstrap-server <host>:<port> --describe

A list of all your topics is displayed. Re-create each topic in Event Streams by using the UI or the CLI.

Using the UI

  1. Log in to your Event Streams UI as an administrator from a supported web browser (see how to determine the login URL for your Event Streams UI).
  2. Click Topics in the primary navigation.
  3. Follow the instructions to create the topic. Ensure you set the same partition and replica settings, as well as any other non-default settings, as you have set for the existing topic in your open source Kafka instance.
  4. Repeat for each topic you have in your open source Kafka instance.

Using the CLI

  1. Log in to your cluster as an administrator by using the IBM Cloud Private CLI:
    cloudctl login -a https://<cluster-address>:<cluster-router-https-port>
  2. Run the following command to initialize the Event Streams CLI on the destination cluster:

    cloudctl es init

  3. Run the following command to create a topic:

    cloudctl es topic-create --name <topic_name> --partitions <number_of_partitions> --replication-factor <number_of_replicas>

    Ensure you set the same partition and replica settings, as well as any other non-default settings, as you have set for the existing topic in your open source Kafka instance.

  4. Repeat for each topic you have in your open-source Kafka cluster.

Change producer configuration

Change the configuration for applications that produce messages to your open-source Kafka cluster to connect to Event Streams instead as described in securing the connections.

If you are using the Kafka console tools, see the instructions for the example console producer in using the console tools to change where the messages are produced to.

Change consumer configuration

Change the configuration for applications that consume messages from your open-source Kafka cluster to connect to Event Streams instead as described in securing the connections.

If you are using the Kafka console tools, see the instructions for the example console consumer in using the console tools to change where messages are consumed from.