Package dev.agenor.autoconfigure
Record Class AgenorProperties.Messaging.Redis
java.lang.Object
java.lang.Record
dev.agenor.autoconfigure.AgenorProperties.Messaging.Redis
- Record Components:
uri- Redis connection URI; defaultredis://localhost:6379consumerGroupPrefix- prefix for stream keys and consumer groups; defaultagenorreadBlockTimeoutMs- XREADGROUP BLOCK timeout in milliseconds; default2000maxStreamLength- max entries per stream before approximate trimming; default100000pendingEntriesTimeoutMs- idle time before a pending entry is eligible for redelivery in ms; default30000maxDeliveryAttempts- max delivery attempts before dead-letter; default3
- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsumerGroupPrefixrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxDeliveryAttemptsrecord component.intReturns the value of themaxStreamLengthrecord component.longReturns the value of thependingEntriesTimeoutMsrecord component.longReturns the value of thereadBlockTimeoutMsrecord component.final StringtoString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.
-
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 aRedisrecord class.- Parameters:
uri- the value for theurirecord componentconsumerGroupPrefix- the value for theconsumerGroupPrefixrecord componentreadBlockTimeoutMs- the value for thereadBlockTimeoutMsrecord componentmaxStreamLength- the value for themaxStreamLengthrecord componentpendingEntriesTimeoutMs- the value for thependingEntriesTimeoutMsrecord componentmaxDeliveryAttempts- the value for themaxDeliveryAttemptsrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
consumerGroupPrefix
Returns the value of theconsumerGroupPrefixrecord component.- Returns:
- the value of the
consumerGroupPrefixrecord component
-
readBlockTimeoutMs
public long readBlockTimeoutMs()Returns the value of thereadBlockTimeoutMsrecord component.- Returns:
- the value of the
readBlockTimeoutMsrecord component
-
maxStreamLength
public int maxStreamLength()Returns the value of themaxStreamLengthrecord component.- Returns:
- the value of the
maxStreamLengthrecord component
-
pendingEntriesTimeoutMs
public long pendingEntriesTimeoutMs()Returns the value of thependingEntriesTimeoutMsrecord component.- Returns:
- the value of the
pendingEntriesTimeoutMsrecord component
-
maxDeliveryAttempts
public int maxDeliveryAttempts()Returns the value of themaxDeliveryAttemptsrecord component.- Returns:
- the value of the
maxDeliveryAttemptsrecord component
-