Reputation: 21
I am using Apache Camel on Spring Boot and want a route to listen to PostgreSQL notify calls.
I have tried using the PgEvent component from Camel, but have found the documentation quite lacking when you want to use a DataSource object to fill in the database specifics (i.e. url, username, password). I have neither found any examples of working solutions in stackoverflow, nor around the web.
Below are some sources I found helpful:
In the end, the "normal" jdbc:postgresql:/...
url I was using did not work. So I followed the linked SO-answer, suggesting using the pgjdbc-ng driver (my colleague suggested the same). Following the documentation of the second link I found that my Camel route started working. All I needed to do was change the previous DataSource url to jdbc:pgsql:/...
.
Hope this helps other people with similar problems. Wasted all too many hours on this little problem.
Upvotes: 1
Views: 447
Reputation: 21
I'm copying my own solution from the question into the answer section, as it may help others find the solution when the question is marked solved. Below is the copy of the final solution:
In the end, the "normal" jdbc:postgresql:/... url I was using did not work. So I followed the linked SO-answer, suggesting using the pgjdbc-ng driver (my colleague suggested the same). Following the documentation of the second link I found that my Camel route started working. All I needed to do was change the previous DataSource url to jdbc:pgsql:/....
Upvotes: 1