-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: re-new connection in PostgresChannelMessageTableSubscriber #9062
fix: re-new connection in PostgresChannelMessageTableSubscriber #9062
Conversation
78bc2df
to
3221eeb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can simulate the reconnection somehow in the unit test.
See PostgresChannelMessageTableSubscriberTests
.
Also note: the version 6.0.x
is out of Open Source Support.
So, we accept the fix and back-port it down to 6.1.x
only.
Thanks
...java/org/springframework/integration/jdbc/channel/PostgresChannelMessageTableSubscriber.java
Outdated
Show resolved
Hide resolved
3221eeb
to
d0e7f7c
Compare
I've added a test that verifies for reconnection after certain time without notifications |
...org/springframework/integration/jdbc/channel/PostgresChannelMessageTableSubscriberTests.java
Show resolved
Hide resolved
...org/springframework/integration/jdbc/channel/PostgresChannelMessageTableSubscriberTests.java
Show resolved
Hide resolved
...java/org/springframework/integration/jdbc/channel/PostgresChannelMessageTableSubscriber.java
Show resolved
Hide resolved
e6cc266
to
4b3e74c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is off with a new test:
PostgresChannelMessageTableSubscriberTests > testRenewConnection() FAILED
org.opentest4j.AssertionFailedError at PostgresChannelMessageTableSubscriberTests.java:282
I saw that. It does work on my machine. Is there any way to get more context (e.g. the assertion message) for this failure? |
PostgresChannelMessageTableSubscriber never renews the connection. This causes problems on DB failover. With this change the connection is renewed when notifications are not received for a certain time. fixes spring-projects#9061
4b3e74c
to
e30bebd
Compare
... and cherry-picked to Thank you for contribution; looking forward for more! |
What is the schedule for the next release? Is it 16th of April? https://calendar.spring.io |
April, 16 |
PostgresChannelMessageTableSubscriber currently never renews the connection. This causes problems on DB failover. With this change the connection is renewed when notifications are not received for a certain time.
fixes #9061