h2database / h2database

H2 is an embeddable RDBMS written in Java.
https://h2database.com
Other
4.16k stars 1.19k forks source link

Feature request: Asynchronous event notifications #2761

Open thospfuller opened 4 years ago

thospfuller commented 4 years ago

I'd like to suggest the addition of PostgreSQL-like NOTIFY / LISTEN functionality as a new feature in the H2 database.

Currently the H2 DatabaseEventListener interface does not include a method which is similar to that found in the impossibl PGNotificationListener interface.

A new method on the DatabaseEventListener interface (or an interface which extends from this specification) with a signature that looks something like:

void notification(String channelName, String payload)

and which emits asynchronous change notifications similar to how this is implemented in Postgres would deliver powerful new functionality in the H2 database.

julienlau commented 11 months ago

I think you are the author of https://dzone.com/articles/hidden-gems-event-driven-change-notifications-in-r thanks for sharing it. It shows an example of implementation of the current (unfriendly) H2 listener