-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
broker: permanently store the initial ApiVersions response
Per-broker, there is no reason to re-issue an ApiVersions request every time a connection is initialized. Instead, we can issue it once on the first connection (or concurrently, if two connection loads see it uninitialized) and store the result. After the result is stored, we will use our stored version forever. This speeds up reconnects by avoiding one round trip, and allows us to probe brokers to see if they actually support something (see incoming commits). ApiVersions is the first thing we do when connecting, so if we load a connection successfully, we know that we have loaded versions.
- Loading branch information
Showing
1 changed file
with
60 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters