I am trying to integrate websocket chat using ERlang, Cowboy, Websocket and gen_bunny.
I can make them work independently.
Browser -> Cowboy websocket chat (Works) Erlang and RabbitMQ AMQP (Works)
Combining them together, I can receive a message from the browser to Cowboy and transfer it to RabbitMQ and return it again from RabbitMQ.
I can even reply to the message to the user who sent it. However, I want to send the message to all connected users.
In my understanding, Erlang will create a separate process for each user. So, how to transfer it to all connected users after I return the answer from RabbitMQ ??
source share