Interface EmgDelivery
public interface EmgDelivery
One message received in peek-lock mode, together with its settlement operations. Exactly one
settlement method should be called per delivery; implementations may throw if the lock has been
lost, in which case the broker redelivers the message after the lock expires.
-
Method Summary
Modifier and TypeMethodDescriptionvoidabandon()Releases the lock without processing: the broker redelivers the message.byte[]body()The raw message body.voidcomplete()Settles the message as processed: the broker deletes it.voiddeadLetter(String reason, String description) Moves the message to the dead-letter sub-queue, where it is kept for inspection and never redelivered.longHow many times the broker has delivered this message (1 on first delivery).The broker's message id, for logging.
-
Method Details
-
body
byte[] body()The raw message body.- Returns:
- the body bytes (UTF-8 JSON for EMG)
-
messageId
String messageId()The broker's message id, for logging. Not a secret; never the body.- Returns:
- the broker message id, may be
null
-
deliveryCount
long deliveryCount()How many times the broker has delivered this message (1 on first delivery).- Returns:
- the delivery count
-
complete
void complete()Settles the message as processed: the broker deletes it. -
abandon
void abandon()Releases the lock without processing: the broker redelivers the message. -
deadLetter
-