Class StreamMessage<K,F,V>

java.lang.Object
io.quarkus.redis.datasource.stream.StreamMessage<K,F,V>
Type Parameters:
K - the type of the key
F - the field type for the payload
V - the value type for the payload

public class StreamMessage<K,F,V> extends Object
Represents a message received from a stream
  • Constructor Details

    • StreamMessage

      public StreamMessage(K stream, String id, Map<F,V> payload)
    • StreamMessage

      public StreamMessage(K stream, String id, Map<F,V> payload, Duration durationSinceLastDelivery, int deliveryCount)
  • Method Details

    • key

      public K key()
      Returns:
      the key of the stream from which the message has been received.
    • id

      public String id()
      Returns:
      the stream id, i.e. the id of the message in the stream.
    • payload

      public Map<F,V> payload()
      Returns:
      the payload of the message
    • durationSinceLastDelivery

      public Duration durationSinceLastDelivery()
      Returns:
      the duration since this message was last delivered to a consumer, or null if this message was not reclaimed via the CLAIM option. Only present when the XREADGROUP CLAIM option is used and this message was a pending entry.
    • deliveryCount

      public int deliveryCount()
      Returns:
      the number of times this message has been delivered, or 0 if this message was not reclaimed via the CLAIM option. Only present when the XREADGROUP CLAIM option is used and this message was a pending entry.