If PayloadApplicationEvent is published via ApplicationEventPublisher from child context, it will not be received by EventListeners in the parent context. This worked in Spring 5.x

Tested with spring versions: 6.0.7, 6.0.8

I have attached a sample application to reproduce the problem.

PayloadApplicationEventS are only received by the EventListener in the child context but not in parent context. Subclasses of ApplicationEvent are not affected and still received by the listener in the parent context.

kind regards Robert

sample.zip

Comment From: simonbasle

This is indeed a regression linked to https://github.com/spring-projects/spring-framework/pull/24599

Comment From: simonbasle

Superseded by PR gh-30420.

Comment From: jhoeller

We eventually decided to introduce a focused revision for addressing this regression, consistently pre-resolving event types vs payload types now.