Hello all.

I'm developing a kafka client and have a question about kafka server guarantees.

A statement from 
https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-Network
 makes me a bit confused:

"The server guarantees that on a single TCP connection, requests will be 
processed in the order they are sent and responses will return in that order as 
well. The broker's request processing allows only a single in-flight request 
per connection in order to guarantee this ordering. Note that clients can (and 
ideally should) use non-blocking IO to implement request pipelining and achieve 
higher throughput. i.e., clients can send requests even while awaiting 
responses for preceding requests since the outstanding requests will be 
buffered in the underlying OS socket buffer. All requests are initiated by the 
client, and result in a corresponding response message from the server except 
where noted."

Does this mean that when a client is sending more than one in-flight request 
per connection, the server does not guarantee that responses will be sent in 
the same order as requests?

In other words, if I have a strictly monotonically increasing integer as a 
correlation id for all requests, can I rely on Kafka that correlation id in 
responses will also have this property?

Thanks.

/Ivan

Reply via email to