Applications may have different requirements of producer--a producer that does not care about acknowledgement for the message they have sent or a producer that cares about acknowledgement but the order of messages does not matter. We have different producer patterns that can be used for application requirement. Let's discuss them one by one:
- Fire-and-forget: In this pattern, producers only care about sending messages to Kafka queues. They really do not wait for any success or failure response from Kafka. Kafka is a highly available system and most of the time, messages would be delivered successfully. However, there is some risk of message loss in this pattern. This kind of pattern is useful when latency has to be minimized to the lowest level possible and one or two lost messages does not affect the overall system functionality. To use...