|
|
|
|
|
by filomeno
1680 days ago
|
|
I read that blog post but I don't quite understand it. I assumed it would work as a regular pub/sub pattern where you get notified when some event happens. However, in the attached example, they still poll the database every half second. I'm not sure I understand the idea. |
|
> JDBC driver cannot receive asynchronous notifications.
Maybe their example is limited by the choice of client library.
This might be a better example? https://tapoueh.org/blog/2018/07/postgresql-listen-notify/
Or the offical postgres docs are:
https://www.postgresql.org/docs/14/sql-notify.html
https://www.postgresql.org/docs/14/sql-listen.html
https://www.postgresql.org/docs/14/libpq-notify.html