1.

How producer works in the Kafka?

Answer»

Producer is a client who send or publish the record. Producer APPLICATIONS write data to topics and consumer applications read from topics. 

  • Producer is a publisher to publish the MESSAGE in one or more Kafka topic.
  • Producer sends data to the broker service.
  • Whenever the producer PUBLISHES the message, the broker just appends the message to the last SEGMENT of the partition.
  • Producer can send the message as per the desire topic as well.

Messages sent by a producer to a topic partition will be APPENDED in the order they are sent. That is, if a record M1 is sent by the same producer as a record M2, and M1 is sent first, then M1 will have a lower offset than M2 and appear earlier in the log.



Discussion

No Comment Found