cpursley / walex

Postgres change events (CDC) in Elixir
MIT License
276 stars 14 forks source link

Using Phoenix.PubSub #67

Closed FabienHenon closed 2 months ago

FabienHenon commented 2 months ago

Hi,

Thank you for your work here!

I'm just wondering why you do not provide a Phoenix.PubSub destination. It could be very useful, plus, it would be great to handle multiple nodes IMHO. This way, every event is boradcasted to PubSub listeners. This makes it more convenient for realtime updates in liveview for instance.

Anyway, I'll probably need it, so I may create a PR ☺️

cpursley commented 2 months ago

You can publish pretty easily from on_event block (you can all any Elixir code).

I'm actually planning to depreciate destinations to keep the library small.

FabienHenon commented 2 months ago

That's good to know, thank you for your answer