Can Brod get/set topic retention?

This looks promising, but I need help translating erlang to Elixir.

API spec: kafka_protocol/src/kpro_req_lib.erl at 7147d6e16652b9b1c39758250bdf93ee934ec706 · kafka4beam/kafka_protocol · GitHub

struct():
https://github.com/kafka4beam/kafka_protocol/blob/7147d6e16652b9b1c39758250bdf93ee934ec706/src/kpro.erl#L193

code:

@version 0
@resource_type_topic 2 # I could not find the values in neither code nor documentation (Just INT8 in https://kafka.apache.org/protocol.html#The_Messages_DescribeConfigs), so I got into online Java IDE and did System.out.println(org.apache.kafka.common.resource.ResourceType.TOPIC.ordinal()); "2" came out.

IO.inspect(:kpro_req_lib.describe_configs(@version, [%{resource_type: @resource_type_topic}, %{resource_name: @test_topic}], %{validate_only: true}))

output:

** (ErlangError) Erlang error: {:field_missing, [stack: [{:describe_configs, 0}, :resources, :resource_name], input: %{resource_type: 2}]}
   stacktrace:
    (kafka_protocol 4.0.3) /Users/maximsenin/workspace/cogynt-common/kafka/deps/kafka_protocol/src/kpro_req_lib.erl:459: :kpro_req_lib.enc_struct/3

as the next step, I want to try to use kafka_protocol/src/kpro_req_lib.erl at 7147d6e16652b9b1c39758250bdf93ee934ec706 · kafka4beam/kafka_protocol · GitHub

Also, I don’t understand how to pass in the broker or zk information here - how does it get connected? Can’t find examples anywhere…