[Hibernate][JPA][Reactive] Does .withBackoff
still execute on the executor-thread?
#45849
Replies: 3 comments 1 reply
-
/cc @DavideD (hibernate-reactive), @gavinking (hibernate-reactive) |
Beta Was this translation helpful? Give feedback.
-
Are you using Hibernate classic or reactive? \CC @jponge |
Beta Was this translation helpful? Give feedback.
-
One might want to use a Vert.x context aware scheduler in such cases. The backoff needs a scheduled executor, so the rest of the execution on a retry is from a thread from this executor. |
Beta Was this translation helpful? Give feedback.
-
Been looking for a way to make our application retry its startup HQL query, but the ways I have been trying seem to fail since i want to delay the execution by a given amount of seconds which causes a thread switch :(. So stumbled across
onFailure().withBackoff(Duration.ofSeconds(1),Duration.ofSeconds(1)).atMost(3)
but also found this stackoverflow https://stackoverflow.com/questions/76043558/quarkus-mutiny-retry-fails-because-on-another-thread.So has this been fixed before I even give it a try?
Beta Was this translation helpful? Give feedback.
All reactions