Record Class QueueOptions

java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.QueueOptions
Record Components:
partitions - number of queue partitions
maxQueuedMessages - maximum live queued messages
maxPayloadBytes - maximum payload bytes
maxLeaseBatchSize - maximum lease batch size
maxActiveLeases - maximum concurrently active leases
maxRetries - maximum retry attempts before dead-letter
defaultVisibilityTimeout - default visibility timeout
All Implemented Interfaces:
Serializable

public record QueueOptions(int partitions, int maxQueuedMessages, int maxPayloadBytes, int maxLeaseBatchSize, int maxActiveLeases, int maxRetries, Duration defaultVisibilityTimeout) extends Record implements Serializable
Queue configuration limits and policies.
See Also:
  • Constructor Details

    • QueueOptions

      public QueueOptions(int partitions, int maxQueuedMessages, int maxPayloadBytes, int maxLeaseBatchSize, int maxActiveLeases, int maxRetries, Duration defaultVisibilityTimeout)
      Creates queue options.
      Throws:
      IllegalArgumentException - when limits are invalid
  • Method Details

    • defaults

      public static QueueOptions defaults()
      Returns conservative defaults.
      Returns:
      default queue options
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • partitions

      public int partitions()
      Returns the value of the partitions record component.
      Returns:
      the value of the partitions record component
    • maxQueuedMessages

      public int maxQueuedMessages()
      Returns the value of the maxQueuedMessages record component.
      Returns:
      the value of the maxQueuedMessages record component
    • maxPayloadBytes

      public int maxPayloadBytes()
      Returns the value of the maxPayloadBytes record component.
      Returns:
      the value of the maxPayloadBytes record component
    • maxLeaseBatchSize

      public int maxLeaseBatchSize()
      Returns the value of the maxLeaseBatchSize record component.
      Returns:
      the value of the maxLeaseBatchSize record component
    • maxActiveLeases

      public int maxActiveLeases()
      Returns the value of the maxActiveLeases record component.
      Returns:
      the value of the maxActiveLeases record component
    • maxRetries

      public int maxRetries()
      Returns the value of the maxRetries record component.
      Returns:
      the value of the maxRetries record component
    • defaultVisibilityTimeout

      public Duration defaultVisibilityTimeout()
      Returns the value of the defaultVisibilityTimeout record component.
      Returns:
      the value of the defaultVisibilityTimeout record component