Class ClusterApplicationEventPublisher

java.lang.Object
io.jmix.core.cluster.ClusterApplicationEventPublisher

@Component("core_ClusterApplicationEventPublisher") public class ClusterApplicationEventPublisher extends Object
A component that allows to publish application events to application instances of a cluster
  • Field Details

    • applicationEventPublisher

      protected org.springframework.context.ApplicationEventPublisher applicationEventPublisher
    • appEventChannelSupplier

      protected ClusterApplicationEventChannelSupplier appEventChannelSupplier
  • Constructor Details

    • ClusterApplicationEventPublisher

      public ClusterApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher, ClusterApplicationEventChannelSupplier appEventChannelSupplier)
  • Method Details

    • onApplicationStarted

      @EventListener public void onApplicationStarted(org.springframework.boot.context.event.ApplicationStartedEvent event)
    • onAppEventMessage

      protected void onAppEventMessage(org.springframework.messaging.Message<?> message)
    • publish

      public void publish(ClusterApplicationEvent event)
      Publishes an event cluster-wide. Note that, in general case, publishing will be asynchronous. Also keep in mind the event will be published also in publishing app instance itself.
      Parameters:
      event - an event to publish