Answer the question
In order to leave comments, you need to log in
How can Spring Boot listen for changes to a table?
When creating/changing a record in a table, the changes must be transferred to another server (MS SQL Server 2000). I thought it was possible directly, but I found only tds-fdw, which can only read from ms sql. There is pgsql-http , but there are a lot of minuses. Is it possible to hang a listener on a table in Spring Boot? I will be glad to any options that will allow me to report changes in PostgreSQL.
Linked server in ms sql can read and write to PostgreSQL, they can be checked for changes after a certain time. But this option was left as a last resort.
Answer the question
In order to leave comments, you need to log in
Postgresql seems to have a Listen / Notify mechanism - see if it fits.
https://jdbc.postgresql.org/documentation/81/liste...
impossibl.github.io/pgjdbc-ng/docs/snapshot/user-g...
Whether correctly I understand, what record in the table occurs not your application?
If so, it is possible to hang up the trigger on the table which will cause records in other table acting as queue. And from another application, you read data from this table and delete what you read. You can come up with a few more options, here you need to consider how fast the first application writes to the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question