klarna/brod with azure/event hub. How to Set up?

Hi we are currently migrating our applications from our own servers to Microsoft Azure and thus replacing kafka by event hub. Currently I try to connect to it, but constantly getting crashes when starting the brod client.
This is how I start it:

endpoints = [{
  "some_dummy_endpoint.windows.net",
  9094
}],
brod_client_config = [{:sasl, {
  :plain,
  "$User",
  "Endpoint=sb://some_dummy_endpoint.windows.net;with_a_lot_of_other_chars",
}}],

:brod.start_client(
        endpoints,
        :some_id,
        brod_client_config
      )

This results in the mentioned crash:

{ā€œcrash_reasonā€:"{[{{ā€œsome_dummy_endpoint.windows.netā€, 9094}, {{{:kpro_req, #Reference<0.2235917605.3298295810.118099>, :api_versions, 0, false, ā€œā€}, :closed}, [{:kpro_lib, :send_and_recv_raw, 4, [file: ā€˜src/kpro_lib.erlā€™, line: 71]}, {:kpro_lib, :send_and_recv, 5, [file: ā€˜src/kpro_lib.erlā€™, line: 82]}, {:kpro_connection, :query_api_versions, 4, [file: ā€˜src/kpro_connection.erlā€™, line: 246]}, {:kpro_connection, :init_connection, 2, [file: ā€˜src/kpro_connection.erlā€™, line: 233]}, {:kpro_connection, :init, 4, [file: ā€˜src/kpro_connection.erlā€™, line: 170]}, {:proc_lib, :init_p_do_apply, 3, [file: ā€˜proc_lib.erlā€™, line: 249]}]}}], [{:brod_client, :ensure_metadata_connection, 1, [file: ā€˜src/brod_client.erlā€™, line: 548]}, {:brod_client, :handle_info, 2, [file: ā€˜src/brod_client.erlā€™, line: 298]}, {:gen_server, :try_dispatch, 4, [file: ā€˜gen_server.erlā€™, line: 637]}, {:gen_server, :handle_msg, 6, [file: ā€˜gen_server.erlā€™, line: 711]}, {:proc_lib, :init_p_do_apply, 3, [file: ā€˜proc_lib.erlā€™, line: 249]}]}",ā€œerlang_pidā€:"#PID<0.5099.0>",ā€œfileā€:ā€œgen_server.erlā€,ā€œfunctionā€:ā€œerror_info/7ā€,ā€œhostnameā€:ā€œaca2d00fc651ā€,ā€œlevelā€:50,ā€œlineā€:889,ā€œmoduleā€:ā€œgen_serverā€,ā€œmsgā€:ā€œGenServer :my_app_kafka_client terminating\n** (stop) [{{ā€œsome_dummy_endpoint.windows.netā€, 9093}, {{{:kpro_req, #Reference<0.2235917605.3298295810.118099>, :api_versions, 0, false, ā€œā€}, :closed}, [{:kpro_lib, :send_and_recv_raw, 4, [file: ā€˜src/kpro_lib.erlā€™, line: 71]}, {:kpro_lib, :send_and_recv, 5, [file: ā€˜src/kpro_lib.erlā€™, line: 82]}, {:kpro_connection, :query_api_versions, 4, [file: ā€˜src/kpro_connection.erlā€™, line: 246]}, {:kpro_connection, :init_connection, 2, [file: ā€˜src/kpro_connection.erlā€™, line: 233]}, {:kpro_connection, :init, 4, [file: ā€˜src/kpro_connection.erlā€™, line: 170]}, {:proc_lib, :init_p_do_apply, 3, [file: ā€˜proc_lib.erlā€™, line: 249]}]}}]\n (brod) src/brod_client.erl:548: :brod_client.ensure_metadata_connection/1\n (brod) src/brod_client.erl:298: :brod_client.handle_info/2\n (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4\n (stdlib) gen_server.erl:711: :gen_server.handle_msg/6\n (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\nLast message: :initā€,ā€œnameā€:ā€œMy_Appā€,ā€œpidā€:1,ā€œregistered_nameā€:ā€œmy_app_kafka_clientā€,ā€œtimeā€:ā€œ2019-09-20T08:41:18.971Zā€,ā€œvā€:0}

Is there something I need to keep in mind to get this working? Are there ans known incompatibilities?

Thanks in advance

1 Like