Skip to content

Conversation

@yunhobb
Copy link

@yunhobb yunhobb commented Nov 14, 2025

Summary

Adds warning log when events configured for externalization are published outside a transactional context.

Fixes #1123

Problem

Events configured with @Externalized that are published outside @Transactional methods fail silently - they're not persisted to the registry and
externalization never occurs.

Solution

The PersistentApplicationEventMulticaster now detects this condition and logs a warning with clear guidance on how to fix the issue.

Changes

  • Added EventExternalizationConfiguration dependency to PersistentApplicationEventMulticaster
  • Implemented detection logic that checks: transaction active, has transactional listeners, event externalized
  • Used ObjectProvider for optional dependency to maintain backward compatibility
  • Updated tests

…ion configuration and add warning for events published outside transaction context.

Signed-off-by: yunhobb <[email protected]>
@yunhobb yunhobb force-pushed the feature/gh-1123-warning-events-published-outside-transaction branch from 8ae599d to e38c964 Compare November 14, 2025 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect events to be externalized not published within a transaction

1 participant