KAFKA

  • Multi-Model Database
  • Java
  • Kafka
Please feel free to contact us
Go

About

It aims to provide a unified, high-throughput, low-latency platform for handling real-time data feeds. Kafka provides reliable, millisecond responses to support both customer-facing applications and connecting downstream systems with real-time data.

Niles Partners is launching a product which will configure and publish Apache Kafka, to produce free implementations of distributed or otherwise scalable and high availability which is embedded pre-configured tool with Ubuntu and ready-to-launch VM on Azure that contains Hadoop, Hbase and Apache Kafka.
Before going into deep, one must learn that whatever we are using, what good it stands for?

And to understand this, we have two applications that are as follows:

Building real-time streaming data pipelines that reliably get data between systems or applications
Building real-time streaming applications that transform or react to the streams of data
It is one of the most popular tool among the developers around the world as it is easy to pick up and such a platform with 4APIs namely Producer, Consumer, Streams, and Connect.

The Producer API allows an application to publish a stream of records to one or more Kafka topics.
The Consumer API allows an application to subscribe to one or more topics and process the stream of records produced to them.
The Streams API allows an application to act as a stream processor, consuming an input stream from one or more topics and producing an output stream to one or more output topics, effectively transforming the input streams to output streams.
The Connector API allows building and running reusable producers or consumers that connect Kafka topics to existing applications or data systems. For example, a connector to a relational database might capture every change to a table.
Without having the basic knowledge, one cannot deeply understand its nature and how it works. For that we should understand a few basic concepts about Apache Kafka:

Kafka run as a cluster on one or more servers.
The Kafka cluster stores streams of records in categories called topics.
Each record consists of a key, a value, and a timestamp.
Topics and Logs

Let’s first dive into the core abstraction Kafka provides for a stream of records—The topic.
A topic is a category or feed name to which records are published. Topics in Kafka are always multi-subscriber; that is, a topic can have zero, one, or many consumers that subscribe to the data written to it.
Kafka stores messages which come from arbitrarily many processes called “producers”. The data can thereby be partitioned in different “partitions” within different “topics”. Within a partition the messages are indexed and stored together with a timestamp.
Other processes called “consumers” can query messages from partitions. Kafka runs on a cluster of one or more servers and the partitions can be distributed across cluster nodes.
Apache Kafka efficiently processes the real-time and streaming data when implemented along with Apache Storm, Apache HBase and Apache Spark. Deployed as a cluster on multiple servers, Kafka handles its entire publish and subscribe messaging system with the help of four APIs, namely, producer API, consumer API, streams API and connector API. Its ability to deliver massive streams of message in a fault-tolerant fashion has made it replace some of the conventional messaging systems like JMS, AMQP, etc.

  1. Type virtual machines in the search.
  2. Under Services, select Virtual machines.
  3. In the Virtual machines page, select Add. The Create a virtual machine page opens.
  4. In the Basics tab, under Project details, make sure the correct subscription is selected and then choose to Create new resource group. Type myResourceGroup for the name.*.
  5. Under Instance details, type myVM for the Virtual machine name, choose East US for your Region, and choose Ubuntu 18.04 LTS for your Image. Leave the other defaults.
  6. Under Administrator account, select SSH public key, type your user name, then paste in your public key. Remove any leading or trailing white space in your public key.
  7. Under Inbound port rules > Public inbound ports, choose Allow selected ports and then select SSH (22) and HTTP (80) from the drop-down.
  8. Leave the remaining defaults and then select the Review + create button at the bottom of the page.
  9. On the Create a virtual machine page, you can see the details about the VM you are about to create. When you are ready, select Create.

It will take a few minutes for your VM to be deployed. When the deployment is finished, move on to the next section.

Connect to virtual machine

Create an SSH connection with the VM.

  1. Select the Connect button on the overview page for your VM.
  2. In the Connect to virtual machine page, keep the default options to connect by IP address over port 22. In Login using VM local account a connection command is shown. Select the button to copy the command. The following example shows what the SSH connection command looks like:

bashCopy

ssh azureuser@10.111.12.123

  1. Using the same bash shell you used to create your SSH key pair (you can reopen the Cloud Shell by selecting >_ again or going to https://shell.azure.com/bash), paste the SSH connection command into the shell to create an SSH session.

Usage/Deployment Instruction

Step 1: Access Kafka from Azure Marketplace and click ON Get it now button.

Click on Continue then on Create,

Step 2:Now to create a virtual machine, enter or select appropriate values for zone, machine type, resource group and so on as per your choice.

Click on Create;

Usage and Deployment Instruction:

Step 1: Open Putty for SSH

Step 2: Open Putty and Type <instance public IP> at “Host Name”

Step 3: Open Connection->SSH->Auth tab from Left Side Area 

Step 4: Click on browse button and select ppk file for Instance and then click on Open

Step 5: Type “ubuntu” as user name Password auto taken from PPK file

Step 5.1: If you get any update option from Ubuntu, then you have to follow the following steps:

After then follow the following commands

$ apt-get update

$ apt-get upgrade

$ sudo su

$ cd kafka_2.13-2.8.0

Step 6: Use following Linux command to Start Kafka and Zookeeper

STEP 7: START THE KAFKA ENVIRONMENT

#Start the ZooKeeper service

zookeeper-server-start.sh config/zookeeper.properties

Open another terminal session and run:

#Start the kafka broker service.

kafka-server-start.sh config/server.properties

Once all services have successfully launched, you will have a basic Kafka environment running and ready to use.

STEP 8: CREATE A TOPIC TO STORE YOUR EVENTS

So before you can write your first events, you must create a topic. Open another terminal session and run:

bin/kafka-topics.sh –create –topic quickstart-events –bootstrap-server localhost:9092

STEP 9: WRITE SOME EVENTS INTO THE TOPIC

bin/kafka-console-producer.sh –topic quickstart-events –bootstrap-server localhost:9092

STEP 10: READ THE EVENTS

Open another terminal session and run the console consumer client to read the events you just created:

bin/kafka-console-consumer.sh –topic quickstart-events –from-beginning –bootstrap-server localhost:9092

If you write a new message using the Producer API, it should also be displayed instantly on the Consumer side as shown in the screenshot below.

Submit Your Request

Captcha

Highlights

  • Distributed Streaming Platform
  • Messaging Backbone
  • Millisecond responses to support both customer-facing applications and connecting downstream systems with real-time data

Application Installed