Record Class EnqueueOptions
java.lang.Object
java.lang.Record
org.j7m.middleware.api.messaging.EnqueueOptions
- Record Components:
priority- message priority, where larger values lease firstpartitionId- explicit target partition, or null for key/hash routingorderingKey- optional ordering/routing keyidempotencyKey- optional explicit idempotency keydedupeKey- optional explicit duplicate-detection keynotBefore- earliest delivery time
- All Implemented Interfaces:
Serializable
public record EnqueueOptions(MessagePriority priority, QueuePartitionId partitionId, OrderingKey orderingKey, IdempotencyKey idempotencyKey, DedupeKey dedupeKey, Instant notBefore)
extends Record
implements Serializable
Options controlling durable queue enqueue behavior.
The record is immutable, serializable, and thread-safe. Phase 6.3 durable queue and outbox recovery preserve these options where they affect message delivery: priority, explicit partition, ordering key, idempotency key, dedupe key, and not-before delivery time. These options do not imply broker-wide ordering, distributed balancing, or generic exactly-once delivery.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEnqueueOptions(MessagePriority priority, QueuePartitionId partitionId, OrderingKey orderingKey, IdempotencyKey idempotencyKey, DedupeKey dedupeKey, Instant notBefore) Creates enqueue options with conservative defaults for null optional fields. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thededupeKeyrecord component.static EnqueueOptionsdefaults()Returns default enqueue options.final booleanIndicates whether some other object is "equal to" this one.Returns the optional explicit partition id.final inthashCode()Returns a hash code value for this object.Returns the value of theidempotencyKeyrecord component.Returns the value of thenotBeforerecord component.Returns the value of theorderingKeyrecord component.Returns the value of thepartitionIdrecord component.priority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EnqueueOptions
public EnqueueOptions(MessagePriority priority, QueuePartitionId partitionId, OrderingKey orderingKey, IdempotencyKey idempotencyKey, DedupeKey dedupeKey, Instant notBefore) Creates enqueue options with conservative defaults for null optional fields.
-
-
Method Details
-
defaults
-
explicitPartition
Returns the optional explicit partition id.- Returns:
- explicit partition when present
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
priority
-
partitionId
Returns the value of thepartitionIdrecord component.- Returns:
- the value of the
partitionIdrecord component
-
orderingKey
Returns the value of theorderingKeyrecord component.- Returns:
- the value of the
orderingKeyrecord component
-
idempotencyKey
Returns the value of theidempotencyKeyrecord component.- Returns:
- the value of the
idempotencyKeyrecord component
-
dedupeKey
-
notBefore
-