Class AtomixPartitionMessagingService

    • Method Detail

      • subscribe

        public void subscribe​(String subject,
                              Consumer<ByteBuffer> consumer,
                              Executor executor)
        Description copied from interface: PartitionMessagingService
        Subscribes to a given subject - if another member of the partition sends a message on this topic, the consumer will be notified with the given payload. Each call is considered a new subscription.
        Specified by:
        subscribe in interface PartitionMessagingService
        Parameters:
        subject - the subject to subscribe to
        consumer - the consumer which handles the payload
        executor - the executor on which the consumer is called
      • broadcast

        public void broadcast​(String subject,
                              ByteBuffer payload)
        Description copied from interface: PartitionMessagingService
        Broadcasts the given payload to all other members of the partition; should log if a member is not subscribed to a given topic, but not fail.
        Specified by:
        broadcast in interface PartitionMessagingService
        Parameters:
        subject - the subject on which to broadcast the payload
        payload - the payload to send
      • unsubscribe

        public void unsubscribe​(String subject)
        Description copied from interface: PartitionMessagingService
        Unsubcribes from the given subject, such that no messages after this call are handled by any previously registered consumer. If none registered, does nothing.
        Specified by:
        unsubscribe in interface PartitionMessagingService
        Parameters:
        subject - the subject from which to unsubscribe