-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Message.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Instant
timestamp
private final Boolean
isFinished
private final Boolean
isRequeued
private final String
topic
private final Integer
attempts
private final String
id
private final ByteArray
data
private final FrameType
type
private final Integer
size
-
Method Summary
Modifier and Type Method Description final Instant
getTimestamp()
The timestamp of this message. final Boolean
isFinished()
Whether or not this message was already confirmed as finished via a message to nsqd or not. final Boolean
isRequeued()
Whether or not this message was already requeued at nsqd. final String
getTopic()
final Integer
getAttempts()
The amount of attempts that already happened for this message. final String
getId()
A unique identifier of the message mainly used for sending an acknowledgement. final ByteArray
getData()
The data payload of the message. final Unit
finish()
Finish this message for good. final Unit
requeue(Duration delay)
Requeue this message at nsqd. final Unit
touch()
Touch this message to reset the processing timeout. -
-
Method Detail
-
getTimestamp
final Instant getTimestamp()
The timestamp of this message. Keep in mind that this is an implementation detail of nsqd and has no guarantees.
-
isFinished
final Boolean isFinished()
-
isRequeued
final Boolean isRequeued()
-
getAttempts
final Integer getAttempts()
The amount of attempts that already happened for this message. The current attempt is included.
-
getId
final String getId()
A unique identifier of the message mainly used for sending an acknowledgement.
-
finish
final Unit finish()
Finish this message for good. This means that nsqd won't send this message again and drops it if no other clients have this message still pending.
-
requeue
final Unit requeue(Duration delay)
Requeue this message at nsqd. The message will usually will be appended to the end of the queue there. However, this is no guaranteed behaviour of nsqd.
-
-
-
-