Enum Class OutboxStatus
- All Implemented Interfaces:
Serializable, Comparable<OutboxStatus>, Constable
Outbox 列的遞送狀態
狀態機:PENDING →(認領)SENDING →(遞送成功)SENT /(遞送失敗、仍可重試)FAILED →(逾重試上限)DEAD;
或 →(政策封鎖,如防火牆全擋)SUPPRESSED。
FAILED 由輪詢器到 nextAttemptAt 時重試,可回到 SENT 或續留 FAILED,逾 maxAttempts 轉 DEAD。
SUPPRESSED 為確定性封鎖、不重試(重試無益),與 DEAD(重試耗盡)語意區分。
SENDING 是認領中的過渡態:fast-path 與輪詢器遞送前先原子認領(PENDING/FAILED → SENDING),
確保同一列在叢集多節點下只被一個執行緒遞送(見 NotificationOutboxRepositoryBase.claim(UUID, Instant, Instant))。認領時把
nextAttemptAt 推遲至 now + claimTimeout;若遞送節點於送出中崩潰,列滯留 SENDING,逾時後
(nextAttemptAt <= now)由輪詢自然重新認領——復原重用既有到期查詢、無額外機制。
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription逾重試上限、放棄遞送(dead-letter 終態,待人工檢視)遞送失敗、仍在重試視窗內(等待nextAttemptAt重試)待遞送(尚未試送,或已排定下次嘗試時間)認領中(過渡態):已被某執行緒原子認領、遞送進行中。崩潰滯留者逾nextAttemptAt由輪詢重新認領已遞送成功(終態)因政策被抑制、未遞送(終態)。確定性封鎖(收件者全不在郵件白名單 / 防火牆啟用卻無白名單), 重試不會改變結果,故不進重試。與DEAD(重試耗盡)區分,供告警與稽核辨識。 -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboxStatusReturns the enum constant of this class with the specified name.static OutboxStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PENDING
待遞送(尚未試送,或已排定下次嘗試時間) -
SENDING
認領中(過渡態):已被某執行緒原子認領、遞送進行中。崩潰滯留者逾nextAttemptAt由輪詢重新認領 -
SENT
已遞送成功(終態) -
FAILED
遞送失敗、仍在重試視窗內(等待nextAttemptAt重試) -
DEAD
逾重試上限、放棄遞送(dead-letter 終態,待人工檢視) -
SUPPRESSED
因政策被抑制、未遞送(終態)。確定性封鎖(收件者全不在郵件白名單 / 防火牆啟用卻無白名單), 重試不會改變結果,故不進重試。與DEAD(重試耗盡)區分,供告警與稽核辨識。
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-