Module lettuce.core

Interface PubSubMessage<K,​V>

All Known Implementing Classes:
PubSubOutput

public interface PubSubMessage<K,​V>
Represents a Pub/Sub notification message.
Since:
6.0
Author:
Mark Paluch
  • Method Details

    • type

      Returns:
      the PubSubOutput.Type message type.
    • channel

      K channel()
      Returns:
      name of the channel to which this notification belongs to.
    • pattern

      K pattern()
      Returns:
      pattern that applies if the message was received through a pattern subscription. Can be null.
    • count

      long count()
      Returns:
      the subscriber count if applicable.
    • body

      V body()
      Returns:
      the message body, if applicable. Can be null.