Using Phoenix channels from golang?

Hi all!

I’m currently working on a Phoenix-based API which should offer the ability to notify connected clients (client software is written in golang) that new data is available for processing. The use of “normal” message queue servers like RabbitMQ would not suffice, as the client software runs at the side of our customers, in their network and should reflect the different privileges of the API etc. As Phoenix already offers that great channels feature for “realtime communication” we’d like to avoid third party software. Since there are clients for Java, Swift and C#, I just found a single client for golang (https://github.com/AlexanderChen1989/channel), which looks quite unfinished.

Do you know any other golang client(s) or is it possible to communicate with Phoenix directly via raw websockets (do you have examples)?

Many thanks.

I’m not aware of a golang channels client, but I would love to see one. I don’t t think it would take much effort for a seasoned go programmer.

1 Like

Go does have some good websocket client libraries, can use any of them to access Phoenix websockets. The payload phoenix uses is really easy to do yourself as long as you remember to keep up with the heartbeats. :slight_smile:

2 Likes