I think there is no reason to push `publisher` here, if we push `connectionFactory` via four lines above.
`else if (this.applicationEventPublisher != null) {` would be enough.