From the previous lecture, you know that every message that is taught at Kafka broker is immutable,
and that means that you are not able to change the contents of the message that was already stored at
Kafka Brocco.
Also, on the other hand, every message has its own structure.
So let me explain it now.
Every message has time stamp, and this time stamp can be assigned to the message either by Kafka broker
or by producer.
So it is configurable.
Also, every message has of set number and kept that in the previous lecture.
I did.
Didn't told you that this number must be unique across Storbeck death because it must be unique only
across Patison.
We will get back to practicals pretty soon in one of the next letters.
But for now, just to recap, that of set number is unique only across partition in a specific topic.
So that's the way our time stamp and offset that are assigned to the message and message itself may
contain key that is optional and value.
Well, of every message is simply a sequence of bytes, nothing else.
And the broker does not care what is actually stored inside of the message.
It stores simply a sequence of bytes.
That means that using Aperture Kafka as centralized transportation messaging system, you are able to
exchange different kinds of data.
For example, you could send objects or you could send strings or numbers or more than that you are
able to send files that must be encoded simply into bytes format.
That's all Kafka stories, just sequences of bytes.
But also, please keep in mind that the idea of Kalika messaging system is to keep messages as small
as possible.
So please don't try to send entire movies in a single message.
That's not the purpose of Kafka.
Its purpose is to quickly send just small messages between producers and consumers.
That's it.
And that is actually optional.
You are able to use as additional grouping mechanism for messages inside of the topic.
For example, if there are multiple stories that the sent messages to centralized Abushagur service,
for example, about sales of every product and using, you are able to set name of each store that sends
data to a Kafka topic.
And using this, you are able to distinguish which shop has sent this or that message also.
And also notice about is they are created on producers and the Santa Gabriel girls and the if several
messages have the same gear, they will be sent to the same position.
We will get back to that later on.
But for now, just keep in mind that using you are able to direct messages to specific partition.
So that's all about message structure.
And to summarize, every message has a unique offset number that is unique across partition.
Second, every message has timestamp and every message has basically message your body.
It is a value and optional Akiem.
So that's all about message structure.
And also, please keep in mind that you should keep every message as small as possible to achieve maximum
efficiency of a bicycle.
Kloster So that's all for this year.
And next, let me explain you how topics are spread among different brokers and what is actually partition
and how partitions are spread among different brokers.
So see you next.
Bye.