<s>
Apache	B-Language
Kafka	I-Language
is	O
a	O
distributed	B-Architecture
event	B-General_Concept
store	I-General_Concept
and	O
stream-processing	B-Application
platform	O
.	O
</s>
<s>
It	O
is	O
an	O
open-source	B-Application
system	O
developed	O
by	O
the	O
Apache	O
Software	O
Foundation	O
written	O
in	O
Java	B-Language
and	O
Scala	B-Application
.	O
</s>
<s>
Kafka	B-Language
can	O
connect	O
to	O
external	O
systems	O
(	O
for	O
data	O
import/export	O
)	O
via	O
Kafka	B-Language
Connect	O
,	O
and	O
provides	O
the	O
Kafka	B-Language
Streams	I-Language
libraries	B-Library
for	O
stream	B-Application
processing	I-Application
applications	O
.	O
</s>
<s>
Kafka	B-Language
uses	O
a	O
binary	O
TCP-based	O
protocol	O
that	O
is	O
optimized	O
for	O
efficiency	O
and	O
relies	O
on	O
a	O
"	O
message	O
set	O
"	O
abstraction	O
that	O
naturally	O
groups	O
messages	O
together	O
to	O
reduce	O
the	O
overhead	O
of	O
the	O
network	O
roundtrip	O
.	O
</s>
<s>
This	O
"	O
leads	O
to	O
larger	O
network	O
packets	O
,	O
larger	O
sequential	O
disk	O
operations	O
,	O
contiguous	O
memory	O
blocks	O
 [ ... ] 	O
which	O
allows	O
Kafka	B-Language
to	O
turn	O
a	O
bursty	O
stream	O
of	O
random	O
message	O
writes	O
into	O
linear	O
writes.	O
"	O
</s>
<s>
Kafka	B-Language
was	O
originally	O
developed	O
at	O
LinkedIn	B-Application
,	O
and	O
was	O
subsequently	O
open	O
sourced	O
in	O
early	O
2011	O
.	O
</s>
<s>
Jay	O
Kreps	O
,	O
Neha	O
Narkhede	O
and	O
Jun	O
Rao	O
helped	O
co-create	O
Kafka	B-Language
.	O
</s>
<s>
Graduation	O
from	O
the	O
Apache	B-Application
Incubator	I-Application
occurred	O
on	O
23	O
October	O
2012	O
.	O
</s>
<s>
Jay	O
Kreps	O
chose	O
to	O
name	O
the	O
software	O
after	O
the	O
author	O
Franz	O
Kafka	B-Language
because	O
it	O
is	O
"	O
a	O
system	O
optimized	O
for	O
writing	O
"	O
,	O
and	O
he	O
liked	O
Kafka	B-Language
's	O
work	O
.	O
</s>
<s>
Apache	B-Language
Kafka	I-Language
is	O
based	O
on	O
the	O
commit	B-Language
log	I-Language
,	O
and	O
it	O
allows	O
users	O
to	O
subscribe	O
to	O
it	O
and	O
publish	O
data	O
to	O
any	O
number	O
of	O
systems	O
or	O
real-time	O
applications	O
.	O
</s>
<s>
Example	O
applications	O
include	O
managing	O
passenger	O
and	O
driver	O
matching	O
at	O
Uber	B-Application
,	O
providing	O
real-time	O
analytics	O
and	O
predictive	O
maintenance	O
for	O
British	O
Gas	O
smart	O
home	O
,	O
and	O
performing	O
numerous	O
real-time	O
services	O
across	O
all	O
of	O
LinkedIn	B-Application
.	O
</s>
<s>
Kafka	B-Language
stores	O
key-value	O
messages	O
that	O
come	O
from	O
arbitrarily	O
many	O
processes	O
called	O
producers	O
.	O
</s>
<s>
For	O
stream	B-Application
processing	I-Application
,	O
Kafka	B-Language
offers	O
the	O
Streams	O
API	O
that	O
allows	O
writing	O
Java	B-Language
applications	O
that	O
consume	O
data	O
from	O
Kafka	B-Language
and	O
write	O
results	O
back	O
to	O
Kafka	B-Language
.	O
</s>
<s>
Apache	B-Language
Kafka	I-Language
also	O
works	O
with	O
external	O
stream	B-Application
processing	I-Application
systems	I-Application
such	O
as	O
Apache	B-Application
Apex	I-Application
,	O
Apache	B-Language
Beam	I-Language
,	O
Apache	B-Application
Flink	I-Application
,	O
Apache	B-Language
Spark	I-Language
,	O
Apache	B-General_Concept
Storm	I-General_Concept
,	O
and	O
Apache	B-Language
NiFi	I-Language
.	O
</s>
<s>
Kafka	B-Language
runs	O
on	O
a	O
cluster	O
of	O
one	O
or	O
more	O
servers	O
(	O
called	O
brokers	O
)	O
,	O
and	O
the	O
partitions	O
of	O
all	O
topics	O
are	O
distributed	B-Architecture
across	O
the	O
cluster	O
nodes	O
.	O
</s>
<s>
This	O
architecture	O
allows	O
Kafka	B-Language
to	O
deliver	O
massive	O
streams	O
of	O
messages	O
in	O
a	O
fault-tolerant	O
fashion	O
and	O
has	O
allowed	O
it	O
to	O
replace	O
some	O
of	O
the	O
conventional	O
messaging	O
systems	O
like	O
Java	B-Language
Message	I-Language
Service	I-Language
(	O
JMS	O
)	O
,	O
Advanced	B-Operating_System
Message	I-Operating_System
Queuing	I-Operating_System
Protocol	I-Operating_System
(	O
AMQP	B-Operating_System
)	O
,	O
etc	O
.	O
</s>
<s>
Since	O
the	O
0.11.0.0	O
release	O
,	O
Kafka	B-Language
offers	O
transactional	O
writes	O
,	O
which	O
provide	O
exactly-once	O
stream	B-Application
processing	I-Application
using	O
the	O
Streams	O
API	O
.	O
</s>
<s>
Kafka	B-Language
supports	O
two	O
types	O
of	O
topics	O
:	O
Regular	O
and	O
compacted	O
.	O
</s>
<s>
If	O
there	O
are	O
records	O
that	O
are	O
older	O
than	O
the	O
specified	O
retention	O
time	O
or	O
if	O
the	O
space	O
bound	O
is	O
exceeded	O
for	O
a	O
partition	O
,	O
Kafka	B-Language
is	O
allowed	O
to	O
delete	O
old	O
data	O
to	O
free	O
storage	O
space	O
.	O
</s>
<s>
Instead	O
,	O
Kafka	B-Language
treats	O
later	O
messages	O
as	O
updates	O
to	O
older	O
message	O
with	O
the	O
same	O
key	O
and	O
guarantees	O
never	O
to	O
delete	O
the	O
latest	O
message	O
per	O
key	O
.	O
</s>
<s>
There	O
are	O
five	O
major	O
APIs	O
in	O
Kafka	B-Language
:	O
</s>
<s>
Admin	O
API	O
–	O
Used	O
to	O
manage	O
Kafka	B-Language
topics	O
,	O
brokers	O
,	O
and	O
other	O
Kafka	B-Language
objects	O
.	O
</s>
<s>
The	O
consumer	O
and	O
producer	O
APIs	O
are	O
decoupled	B-Application
from	O
the	O
core	O
functionality	O
of	O
Kafka	B-Language
through	O
an	O
underlying	O
messaging	O
protocol	O
.	O
</s>
<s>
This	O
allows	O
writing	O
compatible	O
API	O
layers	O
in	O
any	O
programming	O
language	O
that	O
are	O
as	O
efficient	O
as	O
the	O
Java	B-Language
APIs	O
bundled	O
with	O
Kafka	B-Language
.	O
</s>
<s>
The	O
Apache	B-Language
Kafka	I-Language
project	O
maintains	O
a	O
list	O
of	O
such	O
third	O
party	O
APIs	O
.	O
</s>
<s>
Kafka	B-Language
Connect	O
(	O
or	O
Connect	O
API	O
)	O
is	O
a	O
framework	O
to	O
import/export	O
data	O
from/to	O
other	O
systems	O
.	O
</s>
<s>
It	O
was	O
added	O
in	O
the	O
Kafka	B-Language
0.9.0.0	O
release	O
and	O
uses	O
the	O
Producer	O
and	O
Consumer	O
API	O
internally	O
.	O
</s>
<s>
However	O
,	O
Apache	B-Language
Kafka	I-Language
itself	O
does	O
not	O
include	O
production	O
ready	O
connectors	O
.	O
</s>
<s>
Kafka	B-Language
Streams	I-Language
(	O
or	O
Streams	O
API	O
)	O
is	O
a	O
stream-processing	B-Application
library	O
written	O
in	O
Java	B-Language
.	O
</s>
<s>
It	O
was	O
added	O
in	O
the	O
Kafka	B-Language
0.10.0.0	O
release	O
.	O
</s>
<s>
The	O
library	O
allows	O
for	O
the	O
development	O
of	O
stateful	O
stream-processing	B-Application
applications	O
that	O
are	O
scalable	O
,	O
elastic	O
,	O
and	O
fully	O
fault-tolerant	O
.	O
</s>
<s>
The	O
main	O
API	O
is	O
a	O
stream-processing	B-Application
domain-specific	B-Language
language	I-Language
(	O
DSL	O
)	O
that	O
offers	O
high-level	O
operators	O
like	O
filter	O
,	O
map	O
,	O
grouping	O
,	O
windowing	O
,	O
aggregation	O
,	O
joins	O
,	O
and	O
the	O
notion	O
of	O
tables	O
.	O
</s>
<s>
For	O
stateful	O
stream	B-Application
processing	I-Application
,	O
Kafka	B-Language
Streams	I-Language
uses	O
RocksDB	B-Language
to	O
maintain	O
local	O
operator	O
state	O
.	O
</s>
<s>
Because	O
RocksDB	B-Language
can	O
write	O
to	O
disk	O
,	O
the	O
maintained	O
state	O
can	O
be	O
larger	O
than	O
available	O
main	O
memory	O
.	O
</s>
<s>
For	O
fault-tolerance	O
,	O
all	O
updates	O
to	O
local	O
state	O
stores	O
are	O
also	O
written	O
into	O
a	O
topic	O
in	O
the	O
Kafka	B-Language
cluster	O
.	O
</s>
<s>
This	O
allows	O
recreating	O
state	O
by	O
reading	O
those	O
topics	O
and	O
feed	O
all	O
data	O
into	O
RocksDB	B-Language
.	O
</s>
<s>
Up	O
to	O
version	O
0.9.x	O
,	O
Kafka	B-Language
brokers	O
are	O
backward	O
compatible	O
with	O
older	O
clients	O
only	O
.	O
</s>
<s>
Since	O
Kafka	B-Language
0.10.0.0	O
,	O
brokers	O
are	O
also	O
forward	O
compatible	O
with	O
newer	O
clients	O
.	O
</s>
<s>
For	O
the	O
Streams	O
API	O
,	O
full	O
compatibility	O
starts	O
with	O
version	O
0.10.1.0	O
:	O
a	O
0.10.1.0	O
Kafka	B-Language
Streams	I-Language
application	O
is	O
not	O
compatible	O
with	O
0.10.0	O
or	O
older	O
brokers	O
.	O
</s>
<s>
Monitoring	O
end-to-end	O
performance	O
requires	O
tracking	O
metrics	O
from	O
brokers	O
,	O
consumer	O
,	O
and	O
producers	O
,	O
in	O
addition	O
to	O
monitoring	O
ZooKeeper	B-Language
,	O
which	O
Kafka	B-Language
uses	O
for	O
coordination	O
among	O
consumers	O
.	O
</s>
<s>
There	O
are	O
currently	O
several	O
monitoring	O
platforms	O
to	O
track	O
Kafka	B-Language
performance	O
.	O
</s>
<s>
In	O
addition	O
to	O
these	O
platforms	O
,	O
collecting	O
Kafka	B-Language
data	O
can	O
also	O
be	O
performed	O
using	O
tools	O
commonly	O
bundled	O
with	O
Java	B-Language
,	O
including	O
JConsole	B-Language
.	O
</s>
