tadeifelipe

tadeifelipe

Integration Tests with Kafka

Hello, everyone!

I’ve started learning for a technical interview involving the use of an API to send messages to a Kafka Cluster.

I’ve observed a limited number of examples for using Kafka with Elixir. Perhaps I should consider using umbrella projects? However, my main question is: How can I perform integration tests with a Kafka mock server to send and consume messages?

In other languages, for instance, I would use test-containers, but in Elixir, I’m uncertain about the equivalent approach.

I apologize if my questions seem straightforward; I’m relatively new to learning Elixir.

Thank you!

Marked As Solved

LostKobrakai

LostKobrakai

There is a testcontainers implementation for elixir Testcontainers - A Testcontainers implementation for Elixir

Also Liked

dimitarvp

dimitarvp

There is exactly zero problem bringing up a container for integration tests in Elixir as well, there’s nothing special about it, it’s still Docker + Compose in the end. :smiley:

As for Kafka, I believe Overview — brod v4.5.5 is the accepted way of doing it. It also has integration with GitHub - elixir-broadway/broadway: Concurrent and multi-stage data ingestion and data processing with Elixir · GitHub.

Where Next?

Popular in Questions Top

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
lessless
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
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
sergio_101
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
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

We're in Beta

About us Mission Statement