Let’s assume I need a system consist of micro services to be robust I mean surely handle all cycle of a message life. Can that be achieved by using pure channels like gproc2 used in Phoenix? It is non fault tolerant in terms that messages are stored in ram. Should I just use RabbitMQ, there is an RabbitMQ channels backend for Phoenix? Is it robust in that way?
That’s quite convoluted set of questions but I assume you mean to build a system that communicates mostly using message bus, and you never loose a single message.
Gproc2 or phoenix pubsub layer do not persist the messages in any way, I believe. You would have to persist messages yourself, in some dispatching code, before it is being sent. Which is not a bad solution per se, I think it gives you great flexibility when designing your system.
You can use RabbitMQ (I assume that you mean by rabbit me), and it does allow you to use “durable” i.e. persisted message queues by default. This would be my recommended way of doing things if your system consists not only of Elixir/Erlang services, but you may want to integrate with either legacy app or some services written say in Go.