MarginaliaSearch/code/libraries/message-queue/java/nu/marginalia/mq/MqMessageState.java

19 lines
531 B
Java
Raw Normal View History

2023-07-03 09:04:08 +00:00
package nu.marginalia.mq;
public enum MqMessageState {
/** The message is new and has not yet been acknowledged by the recipient */
2023-07-03 09:04:08 +00:00
NEW,
/** The message has been acknowledged by the recipient */
2023-07-03 09:04:08 +00:00
ACK,
/** The message has been processed successfully by the recipient */
2023-07-03 09:04:08 +00:00
OK,
/** The message processing has failed */
2023-07-03 09:04:08 +00:00
ERR,
/** 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
}