title: Spring Boot EventListener always on main thread
body: <p>I have been trying to create an async listener that would execute after my request has been terminated which mean my transaction has been committed. Unfortunately i was not able to make it happen it is always part of the main thread. Which mean my request would never END before the async methods is finishing. It is basically for creating a webhook service that would send an http request when the request going through my system end and the transaction is committed. Does anyone had a similar issue ?</p>
  <pre><code>@Component
  @RequiredArgsConstructor
  public class EventListenerAsync {
  
    @PostPersist
    public void postPersist(final Event event) {
      TransactionSynchronizationManager.registerSynchronization(
          new TransactionSynchronization() {
            @Override
            public void afterCompletion(final int status) {
              if (status == TransactionSynchronization.STATUS_COMMITTED) {
  
                 // call @async public method from another class
  
              }
            }
          });
    }
  
    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void processEventAsynce(final Event event) {
  
      // call @async public method from another class
      
    }
  }
  </code></pre>
  <p>Thanks a lot for you help.</p>