Fl4m3Ph03n1x
Issues configuring kafka_ex
Background
We are trying to connect to Kafka using kafka_ex but we are running into some issues with the setting up a basic example.
Configuration
I have read the configuration files, and all we need is a producer. Our application won’t consume anything, it will simply produce data to kafka.
So our config file looks like this:
config :kafka_ex,
brokers: [
{"localhost", 9092}
],
kafka_version: "0.10.1"
Issue
The problem here is that upon running the app, it raises an exception:
12:50:55.791 [info] Application kafka_ex exited: KafkaEx.start(:normal, []) returned an error: an exception was raised:
** (FunctionClauseError) no function clause matching in KafkaEx.Protocol.ApiVersions.parse_response/2
(kafka_ex) lib/kafka_ex/protocol/api_versions.ex:62: KafkaEx.Protocol.ApiVersions.parse_response(nil, 0)
(kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:178: KafkaEx.Server0P10AndLater.kafka_api_versions/1
(kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:99: KafkaEx.Server0P10AndLater.kafka_server_init/1
(stdlib) gen_server.erl:374: :gen_server.init_it/2
(stdlib) gen_server.erl:342: :gen_server.init_it/6
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
** (Mix) Could not start application kafka_ex: KafkaEx.start(:normal, []) returned an error: an exception was raised:
** (FunctionClauseError) no function clause matching in KafkaEx.Protocol.ApiVersions.parse_response/2
(kafka_ex) lib/kafka_ex/protocol/api_versions.ex:62: KafkaEx.Protocol.ApiVersions.parse_response(nil, 0)
(kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:178: KafkaEx.Server0P10AndLater.kafka_api_versions/1
(kafka_ex) lib/kafka_ex/server_0_p_10_and_later.ex:99: KafkaEx.Server0P10AndLater.kafka_server_init/1
(stdlib) gen_server.erl:374: :gen_server.init_it/2
(stdlib) gen_server.erl:342: :gen_server.init_it/6
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Questions
- What does this mean?
- How can I fix it?
Marked As Solved
jola
2
Popular in Questions
Hello, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
New
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
Hi all
I want to have a unix time, from the current time plus 1 hour.
DateTime.now + 1 hour
How to get it in elixir?
Thanks
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Other popular topics
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New







