Interface ClusterMessagePublisher

All Known Implementing Classes:
ClusterMessageXStreamPublisher

public interface ClusterMessagePublisher
Interface for publishing cluster messages - messages sent to all cluster nodes expect! the sender node. Implementations of this interface are responsible for sending messages to other live nodes in the cluster, which you would typically send with the EventPublisher locally.

If you want the message to be sent locally, you must take care of it independently; this publisher won't do it.

Since:
10.0
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends ClusterMessage>
    void
    publish(T message)
    Publishes a message to the cluster.
  • Method Details

    • publish

      <T extends ClusterMessage> void publish(@NotNull T message)
      Publishes a message to the cluster. Implementations of this method are responsible for serializing the message and sending it to other nodes.
      Type Parameters:
      T - the type of the message, which must extend ClusterMessage
      Parameters:
      message - the message to be published, must not be null