Enum OutboxEventProcessingOrder
- All Implemented Interfaces:
Serializable
,Comparable<OutboxEventProcessingOrder>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboxEventProcessingOrder
static OutboxEventProcessingOrder
Returns the enum constant of this type with the specified name.static OutboxEventProcessingOrder[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUTO
Process outbox events in the safest, most appropriate order based on the dialect and other settings.- When using time-based UUIDs for outbox events (
UuidGenerationStrategy.TIME
), useID
order. - Otherwise, if using a Microsoft SQL Server dialect, don't use any particular order (
NONE
). - Otherwise, use
TIME
order.
- When using time-based UUIDs for outbox events (
-
NONE
Process outbox events in no particular order.This essentially means events will be consumed in a database-specific, undetermined order.
In setups with multiple event processors, this reduces the rate of background failures caused by transaction deadlocks (in particular with Microsoft SQL Server), which does not technically "fix" event processing (those failures are handled automatically by trying again anyway), but may improve performance and reduce unnecessary noise in logs.
However, this may lead to situations where the processing of one particular event is continuously postponed due to newer events being processed before that particular event, which can be a problem in write-intensive scenarios where the event queue is never empty.
-
TIME
Process outbox events in "time" order, i.e. in the order events are created.This ensures events are processed more or less in the order they were created and avoids situations where the processing of one particular event is continuously postponed due to newer events being processed before that particular event.
However, in setups with multiple event processors, this may increase the rate of background failures caused by transaction deadlocks (in particular with Microsoft SQL Server), which does not technically break event processing (those failures are handled automatically by trying again anyway), but may reduce performance and lead to unnecessary noise in logs.
-
ID
Process outbox events in identifier order.If outbox event identifiers are
time-based UUIDs
, this behaves similarly toTIME
, but without the risk of deadlocks.If outbox event identifiers are
random UUIDs
, this behaves similarly toNONE
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
externalRepresentation
-
of
-