Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public final class OutboxMessage

  1. Object
  2. OutboxMessage

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.

Methods

public long getId()The position of this message in its outbox; later messages have larger ids.
public String getKey()The outbox name and the id, name/id.
public String getTopic()The topic the message was enqueued under: a path, an event name, whatever the transport routes on.
public byte[] getPayload()The bytes enqueued.
public int getAttempts()How many deliveries were attempted before this one.
public long getCreated()When the message was enqueued, in milliseconds since the epoch.

Inherited methods

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.