cpursley / walex

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

How does it work on multiple nodes? #41

Open adampash opened 7 months ago

adampash commented 7 months ago

Let's say I have a cluster of 5 different nodes, all running walex. What would happen in that scenario? Would they all trigger when an event was published? Do they round robin them? Something else more clever? Etc.?

Great project, appreciate it.

cpursley commented 7 months ago

Good question @adampash - let me do some testing and get back to you on this.

cpursley commented 7 months ago

It seems like no:

NOTICE 2024-01-12 12:13:54.034 [notice] Application services exited: Services.Application.start(:normal, []) returned an error: shutdown: failed to start child: WalEx.Supervisor
INFO    ** (EXIT) shutdown: failed to start child: WalEx.Replication.Supervisor
INFO        ** (EXIT) shutdown: failed to start child: WalEx.Replication.Server
INFO            ** (EXIT) :function_clause
INFOKernel pid terminated (application_controller) ("{application_start_failure,services,{{shutdown,{failed_to_start_child,'Elixir.WalEx.Supervisor',{shutdown,{failed_to_start_child,'Elixir.WalEx.Replication.Supervisor',{shutdown,{failed_to_start_child,'Elixir.WalEx.Replication.Server',function_clause}}}}}},{'Elixir.Services.Application',start,[normal,[]]}}}")
INFO
INFOCrash dump is being written to: erl_crash.dump...done

I'll start thinking about how to address this issue, thank you for bringing it to my attention.

adampash commented 7 months ago

Thanks @cpursley!