andre1sk

andre1sk

Which Kafka lib are you using? How stable is it?

Subj. Will really appreciate learning about your experience using Elixir and or Erlang with Kafka.

Most Liked

matreyes

matreyes

I’m a heavy Kafka user, and I have been bouncing between Brod, KafkaEx, an BroadwayKafka for a long time.
Until now I have been using Brod, which was a bit abandoned until a month ago, when it was donated to the community by the company that started the project.
Now mainly zmstone and k32 are maintaining the library but they still have too much work to do. Meanwhile, Kafka_ex has also many PRs opened, and lot of work to be done. In both cases, I really think maintainers needs help (and I would love to at least send them a ko-fi).

My problem is that I currently need lz4 compression and Exactly once delivery, and neither of them are there yet. Also I’ve some issues with the consumer group balancer in brod, because our running Kafka version uses an old balancing protocol.

Recently I started looking at the Python, Ruby, Go and Js libraries. Official ones (from Confluent) depends on GitHub - confluentinc/librdkafka: The Apache Kafka C/C++ library · GitHub (C/C++) which has a lot of support.

Of course, there is also one for the BEAM (GitHub - silviucpp/erlkaf: Erlang kafka driver based on librdkafka · GitHub). I’ve used it in development environment, and until now, it works perfectly well. For example, I experimented consuming with a topic with 12 partitions, with 1 node, it automatically spawns 12 processes, I run another node and automatically balances 6 and 6 processes (That is handled by the Kafka protocol).
Someone could be worried by nifs but as erlkaf readme says: librdkafka driver is async, so it doesn’t block.

So I think, for now, I will be migrating to erlkafka. But I will keep looking for brod and kafka_ex, hoping they get more support.

cdegroot

cdegroot

I don’t know which library you refer to as “it”, but we’re running both in production, so that’s a simple question to answer: yes. :wink:

cdegroot

cdegroot

We started just producing - kafka_ex was fine for that. Then we needed a consumer in a new service, kafka_ex didn’t back then (it does now) support consumer groups in the 0.9 style, so we switched to Brod. Recently, we added Kaffe to that as its batched consumer does what we want and it is minimal code (Kaffe is opinionated, we can live with its opinions, and then all you need is basically a single method). We may at some point in the near future do a formal shoot-out and decide to stick with one or the other though ;-).

I don’t have strong opinions on either one - it’s not a super big issue for us, switching between both should be relatively simple, and bigger fish are waiting to be fried. We don’t do crazy volumes, so pretty much anything that talks the protocol will work for us; that might change as well and then we’ll certainly start forming opinions.

Where Next?

Popular in Discussions Top

Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
jeramyRR
This is an interesting article to read. Elixir’s performance, like usual, is excellent. However, it seems like the high CPU usage is co...
New
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
mmport80
I have put far too much effort into Dialyzer over the last year or so - and basically - I doubt it’s worth the effort. It’s not as easy ...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
pdgonzalez872
If this has been asked here before, please point me to where it was asked as I didn’t find it when I searched the forum. Maybe a mailing ...
New

Other popular topics Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
fayddelight
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
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
jononomo
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

We're in Beta

About us Mission Statement