You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to see if the Spring Modulith application events behavior is defined for before-commit transactional event listeners (@TransactionalEventListener(phase = TransactionPhase.BEFORE_COMMIT)). From a small test I did, it seems to still add these listeners to the event_publication table but never marks them completed. I'm wondering if that's something that was intentional and what the recommendation would be for a service that needs to make use of both synchronous before-commit transactional event listeners and asynchronous after-commit ones, but would only want the async ones to be written to the event_publication table. Thanks
The text was updated successfully, but these errors were encountered:
Good catch! That's most certainly a bug. We currently create event publication registry entries for all transactional event listeners, when we, of course, should only create them for after commit listeners.
odrotbohm
changed the title
Question on the expected application events behavior when the code includes BEFORE_COMMIT transactional event listeners
Event publication registry entries created for before commit transactional event listeners
Jul 14, 2024
I wanted to see if the Spring Modulith application events behavior is defined for before-commit transactional event listeners (
@TransactionalEventListener(phase = TransactionPhase.BEFORE_COMMIT)
). From a small test I did, it seems to still add these listeners to theevent_publication
table but never marks them completed. I'm wondering if that's something that was intentional and what the recommendation would be for a service that needs to make use of both synchronous before-commit transactional event listeners and asynchronous after-commit ones, but would only want the async ones to be written to theevent_publication
table. ThanksThe text was updated successfully, but these errors were encountered: