Send message to channel from a process

I have a socket server running within my phoenix server, it used to receive some message send from client.
After I got those message, I want to send them at once to all channels under some topic so that the brower will get these message.
How could achieve this?

You can use the endpoint to broadcast messages.

Here is an example of how I send private message to a user. I think You can use joker, but did not try yet.

Endpoint.broadcast!("user:#{to}", "ping", %{from: from})
1 Like

Thanks, that seems what I need. Will give a try.