Migrating Kafka Python Applications to HPE Data Fabric Streams
With some modification, you can use existing confluent-kafka python applications to consume and produce topics in HPE Data Fabric Streams. The HPE Data Fabric Streams Python Client is a binding for Apache librdkafka that works with HPE Data Fabric Streams.
- Install the HPE Data Fabric Streams Python Client. NOTEThis required that you also install and configure the HPE Data Fabric Streams C Client. See Configuring the HPE Data Fabric Streams C Client.
 - Do one of
        the following depending on whether you are using the EEP 5.0 (or higher) HPE Data Fabric Streams Python
        Client or the EEP 3.0 (or higher) HPE Data Fabric Streams Python Client. 
- If you are using HPE Data Fabric Streams Python EEP 5.0 (or higher), skip this step. The references to
              
confluent_kafkashould be retained. - If you are using HPE Data Fabric Streams Python EEP 3.0 (or higher), update import statements to refer
            to the MapR Stream Python API. References to 
confluent_kafkashould be updated tomapr_streams_python.NOTEFor example, updatefrom confluent_kafka import Consumertofrom mapr_streams_python import Consumer. 
 - If you are using HPE Data Fabric Streams Python EEP 5.0 (or higher), skip this step. The references to
              
 - When you refer to a topic in the application code, include the path and name of the stream
        in which the topic is located:
          
/<path and name of stream>:<name of topic>For example, you might have a stream in a HPE Data Fabric cluster that is named stream_A, and the stream might be in a volume named IoT and in a directory named automobile_sensors. You want to redirect a producer application to a topic in that stream. The syntax of the path to the topic might look like this:
/mapr/IoT/automobile_sensors/stream_A:<name of topic>.NOTEOptionally, use thestreams.consumer.default.streamandstreams.producer.default.streamconfiguration parameters. When you configure these parameters, applications can specify just the topic name to write or read from the default stream. - Review the APIs that are supported and make changes to your application, as needed. See API for HPE Data Fabric Streams Python Client.
 - See Configuration Properties for HPE Data Fabric Streams Python Client for the list of supported configuration
        parameters and make changes to your application, as needed. NOTESSL-related configuration parameters are ignored. When you set these parameters, the HPE Data Fabric Streams Client issues a warning indicating that the parameters are not supported.