2023-07-03 09:04:08 +00:00
|
|
|
package nu.marginalia.mq;
|
|
|
|
|
|
|
|
public enum MqMessageState {
|
2023-07-10 19:52:25 +00:00
|
|
|
/** The message is new and has not yet been acknowledged by the recipient */
|
2023-07-03 09:04:08 +00:00
|
|
|
NEW,
|
2023-07-10 19:52:25 +00:00
|
|
|
/** The message has been acknowledged by the recipient */
|
2023-07-03 09:04:08 +00:00
|
|
|
ACK,
|
2023-07-10 19:52:25 +00:00
|
|
|
/** The message has been processed successfully by the recipient */
|
2023-07-03 09:04:08 +00:00
|
|
|
OK,
|
2023-07-10 19:52:25 +00:00
|
|
|
/** The message processing has failed */
|
2023-07-03 09:04:08 +00:00
|
|
|
ERR,
|
2023-07-10 19:52:25 +00:00
|
|
|
/** The message did not reach a terminal state within the TTL */
|
2023-11-28 15:41:09 +00:00
|
|
|
DEAD;
|
|
|
|
|
|
|
|
public boolean isTerminal() {
|
|
|
|
return this == OK || this == ERR || this == DEAD;
|
|
|
|
}
|
2023-07-03 09:04:08 +00:00
|
|
|
}
|