Remove debug log, fix return type for `@spec api_versions(Keyword.t)`
MODIFY
lib/kafka_ex.ex
lib/kafka_ex.ex
@@ -24,6 +24,7 @@ defmodule KafkaEx do
alias KafkaEx.Protocol.SyncGroup.Response, as: SyncGroupResponse
alias KafkaEx.Protocol.CreateTopics.Request, as: CreateTopicsRequest
alias KafkaEx.Protocol.CreateTopics.Response, as: CreateTopicsResponse
+ alias KafkaEx.Protocol.ApiVersions.Response, as: ApiVersionsResponse
alias KafkaEx.Server
alias KafkaEx.Stream
@@ -532,7 +533,7 @@ defmodule KafkaEx do
@doc """
Retrieve supported api versions for each api key.
"""
- @spec api_versions(Keyword.t) :: CreateTopicsResponse.t
+ @spec api_versions(Keyword.t) :: ApiVersionsResponse.t
def api_versions(opts \\ []) do
worker_name = Keyword.get(opts, :worker_name, Config.default_worker)
Server.call(worker_name, {:api_versions})

MODIFY
lib/kafka_ex/protocol/api_versions.ex
lib/kafka_ex/protocol/api_versions.ex
@@ -56,8 +56,6 @@ defmodule KafkaEx.Protocol.ApiVersions do
api_versions_count :: 32-signed,
rest :: binary
>>, this_api_version) do
- Logger.debug("parse_response for api_versions #{this_api_version}")
-
%{ parse_rest_of_response(api_versions_count, rest, this_api_version) | error_code: Protocol.error(error_code) }
end

Remove debug log, fix return type for `@spec api_versions(Keyword.t)`