Installing Apache Kafka (optional)

Apache Kafka

Apache Kafka is a distributed messaging technology, allowing producers to write messages to queues (topics), and consumers are able to read these messages from the topic. Unlike other messaging platforms, messages in Kafka topics are only retained for a given period, however Kafka does allow multiple consumers to read the same message. Kafka allows users to write their own consumers, and many third-party products are able to interact with Kafka directly to process data.

Apache Kafka uses the underlying Apache Zookeeper technology to create a highly distributed, reliable environment. For more information on Apache Kafka, see Apache Kafka Introduction.

BVR can be configured to produce messages for certain defined Apache Kafka topics as described here Configuring Apache Kafka topics output from BVR.

Installing Apache Kafka

Installing Apache Kafka alongside BVR is optional. BVR does not rely on Apache Kafka for base functionality, however Apache Kafka can be used as a mechanism for accessing any or all of:

You only need to install Kafka if you wish to utilise Kafka for access to any of this data.

For how to install or/and administer Apache Kafka. Follow these instructions: Apache Kafka Quickstart to install Apache Kafka.

Note: The Apache Kafka installation will not use the Java Runtime Environment (JRE) shipped with BVR or BRM. As such, you will need to install a JRE (for example OpenJDK or Oracle JRE) to use Apache Kafka.

Starting and stopping Apache Kafka

Instructions on how to Start and Stop the required Apache Kafka (and Apache Zookeeper) services can be found in the Apache Kafka Quickstart guide. It is worth noting that BVR does not handle the lifecycle of Apache Kafka brokers. It is recommended that when you initialise your environment you follow these steps:

  1. Start Apache Zookeeper, for example:
    nohup /installdir/kafka_2.11-1.1.0/bin/zookeeper-server-start.sh /installdir/kafka_2.11-1.0.0/config/zookeeper.properties &
  2. Start Apache Kafka broker(s), for example:
    nohup /installdir/kafka_2.11-1.1.0/bin/kafka-server-start.sh /installdir/kafka_2.11-1.1.0/config/server.properties &
  3. Repeat Steps 1 and 2 as required for distributed environment
  4. Start BRM
  5. Start BVR
The Apache Kafka Quickstart guide will detail how to create a test topic, and use a sample Producer and Consumer to test your setup. For details on how to create the required topics for use with BVR, see Configuring Apache Kafka topics output from BVR.
Note: It is recommended that you set up a multi-broker cluster to create a highly available Apache Kafka environment. If you setup Kafka in a multi-broker cluster configuration, you will need to make sure the --replication-factor parameter specified on the Kafka topic creation meets your failover requirements. See Configuring Apache Kafka topics output from BVR for more details on replication factor.