Record Class AgenorProperties.Messaging.Redis

java.lang.Object
java.lang.Record
dev.agenor.autoconfigure.AgenorProperties.Messaging.Redis
Record Components:
uri - Redis connection URI; default redis://localhost:6379
consumerGroupPrefix - prefix for stream keys and consumer groups; default agenor
readBlockTimeoutMs - XREADGROUP BLOCK timeout in milliseconds; default 2000
maxStreamLength - max entries per stream before approximate trimming; default 100000
pendingEntriesTimeoutMs - idle time before a pending entry is eligible for redelivery in ms; default 30000
maxDeliveryAttempts - max delivery attempts before dead-letter; default 3
Enclosing class:
AgenorProperties.Messaging

public static record AgenorProperties.Messaging.Redis(String uri, String consumerGroupPrefix, long readBlockTimeoutMs, int maxStreamLength, long pendingEntriesTimeoutMs, int maxDeliveryAttempts) extends Record
Redis Streams configuration.
  • Constructor Details

    • Redis

      public Redis(@DefaultValue("redis://localhost:6379") String uri, @DefaultValue("agenor") String consumerGroupPrefix, @DefaultValue("2000") long readBlockTimeoutMs, @DefaultValue("100000") int maxStreamLength, @DefaultValue("30000") long pendingEntriesTimeoutMs, @DefaultValue("3") int maxDeliveryAttempts)
      Creates an instance of a Redis record class.
      Parameters:
      uri - the value for the uri record component
      consumerGroupPrefix - the value for the consumerGroupPrefix record component
      readBlockTimeoutMs - the value for the readBlockTimeoutMs record component
      maxStreamLength - the value for the maxStreamLength record component
      pendingEntriesTimeoutMs - the value for the pendingEntriesTimeoutMs record component
      maxDeliveryAttempts - the value for the maxDeliveryAttempts record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • uri

      public String uri()
      Returns the value of the uri record component.
      Returns:
      the value of the uri record component
    • consumerGroupPrefix

      public String consumerGroupPrefix()
      Returns the value of the consumerGroupPrefix record component.
      Returns:
      the value of the consumerGroupPrefix record component
    • readBlockTimeoutMs

      public long readBlockTimeoutMs()
      Returns the value of the readBlockTimeoutMs record component.
      Returns:
      the value of the readBlockTimeoutMs record component
    • maxStreamLength

      public int maxStreamLength()
      Returns the value of the maxStreamLength record component.
      Returns:
      the value of the maxStreamLength record component
    • pendingEntriesTimeoutMs

      public long pendingEntriesTimeoutMs()
      Returns the value of the pendingEntriesTimeoutMs record component.
      Returns:
      the value of the pendingEntriesTimeoutMs record component
    • maxDeliveryAttempts

      public int maxDeliveryAttempts()
      Returns the value of the maxDeliveryAttempts record component.
      Returns:
      the value of the maxDeliveryAttempts record component