Open septiyanmudhiya502 opened 9 months ago
You can listen an arbitrary number of PostgreSQL listen channels on a single pq.Listener
. But all notifications will come out of the same Go chan, i.e. pq.Listener.NotificationChannel()
. You have to distribute them to the relevant goroutines (or what have you) yourself. (Or use something like my notifydispatcher; though I now see that it's a bit outdated.)
Is it possible to use 1 listener to listen to 2 different channel ? Currently I'm using 1 same listener instance in 2 different service and both of them listen to different channel, however notification from channel 1 is received in instance 2.