Galena is a library based on GenStage that will help you to create your topic producer-consumer data pipelines.
Conejo is an OTP application/library that facilitate the creation of publishers and consumers of RabbitMQ or AMQP servers. It is based on the library amqp.
"How do you test the libraries if they provide Behaviours to develop concurrent apps?"
Let's see how.
As we have already mentioned we are using Elixir and we use the Actor Model, therefore we can send messages between the processes. Let's see how to use it for testing.
The first step is to register the process where the test is running:
The callback which will handle the message in the secondary process, has to send the result to the main process.
Finally we have to check the result in the main process. Sometimes, we are only interested in knowing that the message was processed by the secondary process and sent to the main one: