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
Popular in Questions
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
In templates/appointment/index.html.eex:
<%= for appointment <- @appointments do %>
<tr>
<td><%= appoi...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
Other popular topics
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Lets say I have map like this fetching from my database
%{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Hello everyone,
Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









