Package com.babelqueue
Record Class Redrive.Options
java.lang.Object
java.lang.Record
com.babelqueue.Redrive.Options
- Record Components:
toQueue- overrides the target queue (sandbox/redirect); when blank, each message goes back to its owndead_letter.original_queuemax- caps how many messages are pulled from the DLQ (0 = all available)dryRun- inspect and report the plan, restoring every message unchangedselect- picks which messages to redrive (unselected are restored unchanged)bypass- stamps the bq-replay-bypass header on each redriven message (seeReplay); a no-op unless the transport is aRedrive.HeaderPublisher
- Enclosing class:
- Redrive
public static record Redrive.Options(String toQueue, int max, boolean dryRun, Predicate<Envelope> select, boolean bypass)
extends Record
Options for a
Redrive.redrive(com.babelqueue.Redrive.Transport, java.lang.String, com.babelqueue.Redrive.Options) run; immutable, built with the fluent withers from
all().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Redrive.Optionsall()Redrive every message back to its source queue.booleanbypass()Returns the value of thebypassrecord component.bypass(boolean enabled) booleandryRun()Returns the value of thedryRunrecord component.dryRun(boolean enabled) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmax()Returns the value of themaxrecord component.max(int limit) select()Returns the value of theselectrecord component.toQueue()Returns the value of thetoQueuerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Options
Creates an instance of aOptionsrecord class.
-
-
Method Details
-
all
Redrive every message back to its source queue. -
toQueue
-
max
-
dryRun
-
select
-
bypass
-
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 '=='. -
toQueue
Returns the value of thetoQueuerecord component.- Returns:
- the value of the
toQueuerecord component
-
max
public int max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
dryRun
public boolean dryRun()Returns the value of thedryRunrecord component.- Returns:
- the value of the
dryRunrecord component
-
select
Returns the value of theselectrecord component.- Returns:
- the value of the
selectrecord component
-
bypass
public boolean bypass()Returns the value of thebypassrecord component.- Returns:
- the value of the
bypassrecord component
-