From b1ba54025fc872e14e1ff97fde018637826a3a5e Mon Sep 17 00:00:00 2001 From: Ashish Singh Date: Tue, 14 Jun 2016 09:49:54 -0700 Subject: [PATCH] KAFKA-3699: Update protocol page on website to explain how KIP-35 should be used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …uld be used Author: Ashish Singh Reviewers: Oleksiy Krivoshey , Gwen Shapira , Magnus Edenhill , Dana Powers , Ewen Cheslack-Postava Closes #1395 from SinghAsDev/KAFKA-3699 --- docs/protocol.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/protocol.html b/docs/protocol.html index c26f16b464c..e28b0a8a617 100644 --- a/docs/protocol.html +++ b/docs/protocol.html @@ -114,6 +114,32 @@

Currently all versions are baselined at 0, as we evolve these APIs we will indicate the format for each version individually.

+
Retrieving Supported API versions
+

In order for a client to successfully talk to a broker, it must use request versions supported by the broker. Clients + may work against multiple broker versions, however to do so the clients need to know what versions of various APIs a + broker supports. Starting from 0.10.0.0, brokers provide information on various versions of APIs they support. Details + of this new capability can be found here. + Clients may use the supported API versions information to take appropriate actions such as propagating an unsupported + API version error to application or choose an API request/response version supported by both the client and broker. + The following sequence maybe used by a client to obtain supported API versions from a broker.

+
    +
  1. Client sends ApiVersionsRequest to a broker after connection has been established with the broker. If SSL is enabled, + this happens after SSL connection has been established.
  2. +
  3. On receiving ApiVersionsRequest, a broker returns its full list of supported ApiKeys and + versions regardless of current authentication state (e.g., before SASL authentication on an SASL listener, do note that no + Kafka protocol requests may take place on a SSL listener before the SSL handshake is finished). If this is considered to + leak information about the broker version a workaround is to use SSL with client authentication which is performed at an + earlier stage of the connection where the ApiVersionRequest is not available. Also, note that broker versions older + than 0.10.0.0 do not support this API and will either ignore the request or close connection in response to the request.
  4. +
  5. If multiple versions of an API are supported by broker and client, clients are recommended to use the latest version supported + by the broker and itself.
  6. +
  7. Deprecation of a protocol version is done by marking an API version as deprecated in protocol documentation.
  8. +
  9. Supported API versions obtained from a broker, is valid only for current connection on which that information is obtained. + In the event of disconnection, the client should obtain the information from broker again, as the broker might have + upgraded/downgraded in the mean time.
  10. +
+ +
SASL Authentication Sequence

The following sequence is used for SASL authentication: