Class OutboxMessage

java.lang.Object
com.codename1.io.outbox.OutboxMessage

public final class OutboxMessage extends Object

One message waiting in an Outbox, as the transport receives it.

Delivery is at least once: a message whose acknowledgement was lost is sent again. The receiver deduplicates on getKey(), which no other message of the same outbox ever carries.

  • Method Details

    • getId

      public long getId()
      The position of this message in its outbox; later messages have larger ids.
    • getKey

      public String getKey()
      The outbox name and the id, name/id. Stable across retries, so a receiver that already applied it can acknowledge and drop the copy.
    • getTopic

      public String getTopic()
      The topic the message was enqueued under: a path, an event name, whatever the transport routes on.
    • getPayload

      public byte[] getPayload()
      The bytes enqueued. The array is this message's own; do not modify it.
    • getAttempts

      public int getAttempts()
      How many deliveries were attempted before this one.
    • getCreated

      public long getCreated()
      When the message was enqueued, in milliseconds since the epoch.